fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14859] property: fix service agreement form


From: Sigurd Nes
Subject: [Fmsystem-commits] [14859] property: fix service agreement form
Date: Wed, 23 Mar 2016 13:44:45 +0000

Revision: 14859
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14859
Author:   sigurdne
Date:     2016-03-23 13:44:44 +0000 (Wed, 23 Mar 2016)
Log Message:
-----------
property: fix service agreement form

Modified Paths:
--------------
    trunk/property/inc/class.bocommon.inc.php
    trunk/property/inc/class.bos_agreement.inc.php
    trunk/property/inc/class.sos_agreement.inc.php
    trunk/property/inc/class.uis_agreement.inc.php
    trunk/property/js/portico/s_agreement.edit.js
    trunk/property/setup/phpgw_no.lang
    trunk/property/templates/base/b_account_form.xsl
    trunk/property/templates/base/cat_select.xsl
    trunk/property/templates/base/ecodimb_form.xsl
    trunk/property/templates/base/s_agreement.xsl

Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php   2016-03-22 15:33:12 UTC (rev 
14858)
+++ trunk/property/inc/class.bocommon.inc.php   2016-03-23 13:44:44 UTC (rev 
14859)
@@ -165,7 +165,8 @@
                                {
                                        if ($entry['id'] == $selected)
                                        {
-                                               $entry['selected'] = 'selected';
+                                               $entry['selected'] = 1;
+                                               break;
                                        }
                                }
                                return $list;

Modified: trunk/property/inc/class.bos_agreement.inc.php
===================================================================
--- trunk/property/inc/class.bos_agreement.inc.php      2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/inc/class.bos_agreement.inc.php      2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -520,9 +520,4 @@
 
                        return $values;
                }
-
-               function delete_year_from_budget( $data, $agreement_id )
-               {
-                       return $this->so->delete_year_from_budget($data, 
$agreement_id);
-               }
        }
\ No newline at end of file

Modified: trunk/property/inc/class.sos_agreement.inc.php
===================================================================
--- trunk/property/inc/class.sos_agreement.inc.php      2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/inc/class.sos_agreement.inc.php      2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -836,7 +836,7 @@
 
                        $vals = $this->db->validate_insert($vals);
 
-                       if (isset($values['budget']) && $values['budget'])
+                       if (isset($values['budget']) && $values['budget'] && 
isset($values['b_account_id']) && $values['b_account_id'] && 
isset($values['ecodimb']) && $values['ecodimb'])
                        {
                                $_budget = array
                                        (
@@ -851,8 +851,8 @@
                                $this->update_budget($_budget);
                        }
 
-                       $this->db->query("INSERT INTO $table 
(id,name,descr,entry_date,category,member_of,start_date,end_date,termination_date,vendor_id,account_id,user_id
 $cols) "
-                               . "VALUES ($vals)", __LINE__, __FILE__);
+                       $this->db->query("INSERT INTO {$table} 
(id,name,descr,entry_date,category,member_of,start_date,end_date,termination_date,vendor_id,account_id,user_id
 $cols) "
+                               . "VALUES ({$vals})", __LINE__, __FILE__);
 
                        $this->db->query("INSERT INTO fm_orders (id,type) 
VALUES ($id,'s_agreement')");
 
@@ -862,7 +862,7 @@
                                $this->db->query("UPDATE fm_vendor SET 
member_of = '{$member_of}' WHERE id= {$vendor_id}");
                        }
 
-                       $receipt['s_agreement_id'] = 
$id;//$this->db->get_last_insert_id($table,'id');
+                       $receipt['s_agreement_id'] = $id;
 
                        $receipt['message'][] = array('msg' => 
lang('s_agreement %1 has been saved', $receipt['s_agreement_id']));
 
@@ -1071,7 +1071,7 @@
                        }
 
                        $this->db->transaction_begin();
-                       if (isset($values['budget']) && $values['budget'])
+                       if (isset($values['budget']) && $values['budget'] && 
isset($values['b_account_id']) && $values['b_account_id'] && 
isset($values['ecodimb']) && $values['ecodimb'])
                        {
                                $_budget = array
                                        (
@@ -1095,6 +1095,10 @@
                                $vendor_id = (int)$values['vendor_id'];
                                $this->db->query("UPDATE fm_vendor SET 
member_of = '{$member_of}' WHERE id= {$vendor_id}");
                        }
+                       if (isset($values['delete_b_year']) && 
is_array($values['delete_b_year']))
+                       {
+                               
$this->delete_year_from_budget($values['delete_b_year'], 
$values['s_agreement_id']);
+                       }
 
                        $this->db->transaction_commit();
                        $receipt['s_agreement_id'] = $values['s_agreement_id'];

Modified: trunk/property/inc/class.uis_agreement.inc.php
===================================================================
--- trunk/property/inc/class.uis_agreement.inc.php      2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/inc/class.uis_agreement.inc.php      2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -617,20 +617,61 @@
                                $values['b_account_id'] = 
phpgw::get_var('b_account_id', 'int', 'POST');
                                $values['b_account_name'] = 
phpgw::get_var('b_account_name', 'string', 'POST');
 
-                               if (!$values['cat_id'])
+                               $values_attribute = 
phpgw::get_var('values_attribute');
+                               $insert_record_s_agreement = 
$GLOBALS['phpgw']->session->appsession('insert_record_values.s_agreement', 
'property');
+                               for ($j = 0; $j < 
count($insert_record_s_agreement); $j++)
                                {
-                                       $receipt['error'][] = array('msg' => 
lang('Please select a category !'));
+                                       
$insert_record['extra'][$insert_record_s_agreement[$j]] = 
$insert_record_s_agreement[$j];
                                }
 
+                               while (is_array($insert_record['extra']) && 
list($key, $column) = each($insert_record['extra']))
+                               {
+                                       if ($_POST[$key])
+                                       {
+                                               $values['extra'][$column] = 
phpgw::get_var($key, 'string', 'POST');
+                                       }
+                               }
 
-                               if (($values['ecodimb'] || 
$values['b_account_id']) && (!isset($values['budget']) || !$values['budget']))
+                               if (!$values['cat_id'])
                                {
-                                       $receipt['error'][] = array('msg' => 
lang('Missing budget value'));
+                                       $receipt['error'][] = array('msg' => 
lang('Please select a category !'));
                                }
+                               if (!$values['name'])
+                               {
+                                       $receipt['error'][] = array('msg' => 
lang('please enter a name !'));
+                               }
+                               if (!$values['descr'])
+                               {
+                                       $receipt['error'][] = array('msg' => 
lang('please enter a description!'));
+                               }
+                               if (!$values['start_date'])
+                               {
+                                       $receipt['error'][] = array('msg' => 
lang('please enter a start date!'));
+                               }
+                               if (!$values['end_date'])
+                               {
+                                       $receipt['error'][] = array('msg' => 
lang('please enter a end date!'));
+                               }
 
-                               if (isset($values['budget']) && 
$values['budget'] && !ctype_digit($values['budget']))
+
+                               if (isset($values['budget']) && 
$values['budget'])
                                {
-                                       $receipt['error'][] = array('msg' => 
lang('budget') . ': ' . lang('Please enter an integer !'));
+                                       if (!ctype_digit($values['budget']))
+                                       {
+                                               $receipt['error'][] = 
array('msg' => lang('budget') . ': ' . lang('Please enter an integer !'));
+                                       }
+                                       if (!isset($values['ecodimb']) || 
!$values['ecodimb'])
+                                       {
+                                               $receipt['error'][] = 
array('msg' => lang('accounting dim b'));
+                                       }
+                                       if (!isset($values['order_category']) 
|| !$values['order_category'])
+                                       {
+                                               $receipt['error'][] = 
array('msg' => lang('category'));
+                                       }
+                                       if (!isset($values['b_account_id']) || 
!$values['b_account_id'])
+                                       {
+                                               $receipt['error'][] = 
array('msg' => lang('budget account'));
+                                       }
                                }
 
                                if ($id)
@@ -643,11 +684,6 @@
                                        $values['s_agreement_id'] = 
$this->bo->request_next_id();
                                }
 
-                               if (isset($values['delete_b_year']) && 
is_array($values['delete_b_year']))
-                               {
-                                       
$this->bo->delete_year_from_budget($values['delete_b_year'], $id);
-                               }
-
                                $bofiles = CreateObject('property.bofiles');
                                if (isset($values['file_action']) && 
is_array($values['file_action']))
                                {
@@ -692,7 +728,8 @@
 
                                                if ($values['save'])
                                                {
-                                                       
$GLOBALS['phpgw']->session->appsession('session_data', 's_agreement_receipt', 
$receipt);
+                                                       
self::message_set($receipt);
+                                                       //                      
                $GLOBALS['phpgw']->session->appsession('session_data', 
's_agreement_receipt', $receipt);
                                                        
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 
'property.uis_agreement.index',
                                                                'role' => 
$this->role));
                                                }
@@ -714,7 +751,13 @@
                                }
                                else
                                {
-                                       $this->edit();
+                                       self::message_set($receipt);
+                                       /* Preserve attribute values from post 
*/
+                                       if (isset($receipt['error']) && 
(isset($values_attribute) && is_array($values_attribute)))
+                                       {
+                                               $values = 
$this->bocommon->preserve_attribute_values($values, $values_attribute);
+                                       }
+                                       $this->edit($values);
                                }
                        }
                        else
@@ -921,7 +964,7 @@
                        }
                }
 
-               function edit()
+               function edit( $values = array() )
                {
                        $id = phpgw::get_var('id'); // in case of bigint
 
@@ -932,111 +975,26 @@
                        }
 
                        phpgwapi_jquery::load_widget('core');
-                       $values = phpgw::get_var('values');
-                       $delete_item = phpgw::get_var('delete_item');
-                       $item_id = phpgw::get_var('item_id');
 //                     $active_tab             = phpgw::get_var('tab', 
'string', 'REQUEST', 'general');
 
                        $config = CreateObject('phpgwapi.config', 'property');
                        $boalarm = CreateObject('property.boalarm');
                        $get_items = false;
 
-                       $values_attribute = phpgw::get_var('values_attribute');
-                       $insert_record_s_agreement = 
$GLOBALS['phpgw']->session->appsession('insert_record_values.s_agreement', 
'property');
-
                        $tabs = array();
                        $tabs['general'] = array('label' => lang('general'), 
'link' => '#general');
                        $active_tab = 'general';
                        $tabs['items'] = array('label' => lang('items'), 'link' 
=> "#items");
 
-                       for ($j = 0; $j < count($insert_record_s_agreement); 
$j++)
-                       {
-                               
$insert_record['extra'][$insert_record_s_agreement[$j]] = 
$insert_record_s_agreement[$j];
-                       }
-
-
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('s_agreement', 'attributes_form', 
'files'));
 
-                       if (is_array($values))
-                       {
-                               $values['ecodimb'] = phpgw::get_var('ecodimb');
-                               while (is_array($insert_record['extra']) && 
list($key, $column) = each($insert_record['extra']))
-                               {
-                                       if ($_POST[$key])
-                                       {
-                                               $values['extra'][$column] = 
phpgw::get_var($key, 'string', 'POST');
-                                       }
-                               }
-
-                               if ($values['update'])
-                               {
-                                       if (!$values['date'])
-                                       {
-                                               $receipt['error'][] = 
array('msg' => lang('Please select a date !'));
-                                       }
-                                       if (!$values['new_index'])
-                                       {
-                                               $receipt['error'][] = 
array('msg' => lang('Please enter a index !'));
-                                       }
-
-                                       if (!$receipt['error'])
-                                       {
-                                               $receipt = 
$this->bo->update($values);
-                                       }
-                                       $get_items = true;
-                               }
-                               else if ($values['delete_alarm'] && 
count($values['alarm']))
-                               {
-
-                                       if (!$receipt['error'])
-                                       {
-                                               $receipt = 
$boalarm->delete_alarm('s_agreement', $values['alarm']);
-                                       }
-                               }
-                               else if (($values['enable_alarm'] || 
$values['disable_alarm']) && count($values['alarm']))
-                               {
-
-                                       if (!$receipt['error'])
-                                       {
-                                               $receipt = 
$boalarm->enable_alarm('s_agreement', $values['alarm'], 
$values['enable_alarm']);
-                                       }
-                               }
-                               else if ($values['add_alarm'])
-                               {
-                                       $time = intval($values['time']['days']) 
* 24 * 3600 + intval($values['time']['hours']) * 3600 + 
intval($values['time']['mins']) * 60;
-
-                                       if ($time > 0)
-                                       {
-                                               $receipt = 
$boalarm->add_alarm('s_agreement', $this->bo->read_event(array(
-                                                               
's_agreement_id' => $id)), $time, $values['user_id']);
-                                       }
-                               }
-                               else if (!$values['save'] && !$values['apply'] 
&& !$values['update'])
-                               {
-                                       
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction' => 
'property.uis_agreement.index',
-                                               'role' => $this->role));
-                               }
-                       }
-
-
-                       /* Preserve attribute values from post */
-                       if (isset($receipt['error']) && 
(isset($values_attribute) && is_array($values_attribute)))
-                       {
-                               $values = 
$this->bocommon->preserve_attribute_values($values, $values_attribute);
-                       }
-
-
                        
$GLOBALS['phpgw']->jqcal->add_listener('values_start_date');
                        
$GLOBALS['phpgw']->jqcal->add_listener('values_end_date');
                        
$GLOBALS['phpgw']->jqcal->add_listener('values_termination_date');
 
-                       $this->member_id = $values['member_of'] ? 
$values['member_of'] : $this->member_id;
-
                        if ($id)
                        {
                                $values = 
$this->bo->read_single(array('s_agreement_id' => $id));
-                               $this->cat_id = ($values['cat_id'] ? 
$values['cat_id'] : $this->cat_id);
-                               $this->member_id = $values['member_of'] ? 
$values['member_of'] : $this->member_id;
                                $list = $this->bo->read_details($id);
                                $uicols = $this->bo->uicols;
                                $list = $this->list_content($list, $uicols);
@@ -1061,6 +1019,8 @@
                                        );
                                }
                        }
+                       $this->cat_id = ($values['cat_id'] ? $values['cat_id'] 
: $this->cat_id);
+                       $this->member_id = $values['member_of'] ? 
$values['member_of'] : $this->member_id;
 
                        $link_data = array
                                (
@@ -1069,10 +1029,12 @@
                                'role' => $this->role
                        );
 
-                       $vendor_data = 
$this->bocommon->initiate_ui_vendorlookup(array
-                               (
+                       $vendor_data = 
$this->bocommon->initiate_ui_vendorlookup(array(
                                'vendor_id' => $values['vendor_id'],
-                               'vendor_name' => $values['vendor_name']));
+                               'vendor_name' => $values['vendor_name'],
+                               'required' => true
+                               )
+                       );
 
                        $b_account_data = 
$this->bocommon->initiate_ui_budget_account_lookup(array
                                (
@@ -1084,8 +1046,7 @@
                                'ecodimb' => $values['ecodimb'],
                                'ecodimb_descr' => $values['ecodimb_descr']));
 
-                       $alarm_data = $this->bocommon->initiate_ui_alarm(array
-                               (
+                       $alarm_data = $this->bocommon->initiate_ui_alarm(array(
                                'acl_location' => $this->acl_location,
                                'alarm_type' => 's_agreement',
                                'type' => 'form',
@@ -1095,10 +1056,9 @@
                                'method' => $method,
                                'data' => $data,
                                'account_id' => $account_id
-                       ));
+                               )
+                       );
 
-                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
-
                        if ($values['vendor_id'])
                        {
                                $member_of_list = 
$this->get_vendor_member_info($values['vendor_id']);
@@ -1141,13 +1101,10 @@
                        $GLOBALS['phpgw']->js->validate_file('overlib', 
'overlib', 'property');
                        $GLOBALS['phpgw']->js->validate_file('core', 'check', 
'property');
 
-//                     $tabs = array();
 
                        if (isset($values['attributes']) && 
is_array($values['attributes']))
                        {
 
-//                             $tabs['general']        = array('label' => 
lang('general'), 'link' => '#general');
-
                                $location = $this->acl_location;
                                $attributes_groups = 
$this->bo->get_attribute_groups($location, $values['attributes']);
 
@@ -1161,182 +1118,8 @@
                                }
                                unset($attributes_groups);
                                unset($values['attributes']);
-
-//                             $tabs['items']  = array('label' => 
lang('items'), 'link' => '#items');
                        }
 
-                       //----------JSON CODE 
----------------------------------------------
-                       //---GET ITEMS
-                       if (phpgw::get_var('phpgw_return_as') == 'json' && 
$get_items)
-                       {
-                               //$this->bo->delete_item($id,$item_id);
-                               $list = $this->bo->read_details($id);
-                               $list = $this->list_content($list, $uicols);
-                               $content = $list['content'];
-
-                               $content_values = array();
-
-                               for ($y = 0; $y < count($content); $y++)
-                               {
-                                       for ($z = 0; $z < 
count($content[$y]['row']); $z++)
-                                       {
-                                               if ($content[$y]['row'][$z + 
1]['name'] != '')
-                                               {
-                                                       
$content_values[$y][$content[$y]['row'][$z + 1]['name']] = 
$content[$y]['row'][$z + 1]['value'];
-                                               }
-                                       }
-                               }
-
-                               if (count($content_values))
-                               {
-                                       return json_encode($content_values);
-                               }
-                               else
-                               {
-                                       return "";
-                               }
-                       }
-
-                       //---GET ALARM
-                       else if (phpgw::get_var('phpgw_return_as') == 'json' && 
!$get_items)
-                       {
-                               $alarm_data = 
$this->bocommon->initiate_ui_alarm(array
-                                       (
-                                       'acl_location' => $this->acl_location,
-                                       'alarm_type' => 's_agreement',
-                                       'type' => 'form',
-                                       'text' => 'Email notification',
-                                       'times' => isset($times) ? $times : '',
-                                       'id' => $id,
-                                       'method' => isset($method) ? $method : 
'',
-                                       'data' => isset($data) ? $data : '',
-                                       'account_id' => isset($account_id) ? 
$account_id : ''
-                               ));
-                               //$alarm_data['values'] = array();
-                               if (count($alarm_data['values']))
-                               {
-                                       return 
json_encode($alarm_data['values']);
-                               }
-                               else
-                               {
-                                       return "";
-                               }
-                       }
-
-                       //--------------------JSON code-----
-                       $parameters = array
-                               (
-                               'parameter' => array
-                                       (
-                                       array
-                                               (
-                                               'name' => 's_agreement_id',
-                                               'source' => $id,
-                                               'ready' => 1
-                                       ),
-                                       array
-                                               (
-                                               'name' => 'id',
-                                               'source' => 'item_id'
-                                       ),
-                                       array
-                                               (
-                                               'name' => 'from',
-                                               'source' => $view_only ? 'view' 
: 'edit',
-                                               'ready' => 1
-                                       )
-                               )
-                       );
-
-                       $parameters2 = array
-                               (
-                               'parameter' => array
-                                       (
-                                       array
-                                               (
-                                               'name' => 's_agreement_id',
-                                               'source' => $id,
-                                               'ready' => 1
-                                       ),
-                                       array
-                                               (
-                                               'name' => 'id',
-                                               'source' => 'item_id'
-                                       )
-                               )
-                       );
-
-                       $parameters3 = array
-                               (
-                               'parameter' => array
-                                       (
-                                       array
-                                               (
-                                               'name' => 'id',
-                                               'source' => $id,
-                                               'ready' => 1
-                                       ),
-                                       array
-                                               (
-                                               'name' => 'item_id',
-                                               'source' => 'item_id'
-                                       ),
-                                       array
-                                               (
-                                               'name' => 'delete_item',
-                                               'source' => 1,
-                                               'ready' => 1
-                                       )
-                               )
-                       );
-
-                       //_debug_array($parameters3);die;
-
-                       /* REQUIRES VALIDATION OF PERMISSIONS */
-                       $permissions['rowactions'][] = array
-                               (
-                               'text' => lang('View'),
-                               'action' => 
$GLOBALS['phpgw']->link('/index.php', array
-                                       (
-                                       'menuaction' => 
'property.uis_agreement.view_item'
-                               )),
-                               'parameters' => $parameters
-                       );
-
-                       $permissions['rowactions'][] = array
-                               (
-                               'text' => lang('Edit'),
-                               'action' => 
$GLOBALS['phpgw']->link('/index.php', array
-                                       (
-                                       'menuaction' => 
'property.uis_agreement.edit_item'
-                               )),
-                               'parameters' => $parameters2
-                       );
-
-                       $permissions['rowactions'][] = array
-                               (
-                               'text' => lang('Delete'),
-                               'action' => 
$GLOBALS['phpgw']->link('/index.php', array
-                                       (
-                                       'menuaction' => 
'property.uis_agreement.edit'
-                               )),
-                               'confirm_msg' => lang('do you really want to 
delete this entry'),
-                               'parameters' => $parameters3
-                       );
-
-                       $content_values = array();
-
-                       for ($y = 0; $y < count($content); $y++)
-                       {
-                               for ($z = 0; $z < count($content[$y]['row']); 
$z++)
-                               {
-                                       if ($content[$y]['row'][$z + 1]['name'] 
!= '')
-                                       {
-                                               
$content_values[$y][$content[$y]['row'][$z + 1]['name']] = 
$content[$y]['row'][$z + 1]['value'];
-                                       }
-                               }
-                       }
-
                        $requestUrl_Alarm = json_encode(self::link(array(
                                        'menuaction' => 
'property.uis_agreement.get_contentalarm',
                                        'acl_location' => $this->acl_location,
@@ -1621,12 +1404,10 @@
                                'lang_file_action_statustext' => lang('Check to 
delete file'),
                                'lang_upload_file' => lang('Upload file'),
                                'lang_file_statustext' => lang('Select file to 
upload'),
-                               'msgbox_data' => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
                                'edit_url' => 
$GLOBALS['phpgw']->link('/index.php', $link_data),
                                'cancel_url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uis_agreement.index')),
                                'lang_id' => lang('ID'),
                                'value_s_agreement_id' => $id,
-                               'lang_category' => lang('category'),
                                'lang_save' => lang('save'),
                                'lang_cancel' => lang('cancel'),
                                'lang_apply' => lang('apply'),
@@ -1635,10 +1416,10 @@
                                'lang_cancel_statustext' => lang('Leave the 
service agreement untouched and return back to the list'),
                                'lang_save_statustext' => lang('Save the 
service agreement and return back to the list'),
                                'lang_no_cat' => lang('no category'),
-                               'lang_cat_statustext' => lang('Select the 
category the s_agreement belongs to. To do not use a category select NO 
CATEGORY'),
                                'select_name' => 'values[cat_id]',
-                               'cat_list' => 
$this->bocommon->select_category_list(array('format' => 'select',
-                                       'selected' => $this->cat_id, 'type' => 
's_agreement', 'order' => 'descr')),
+                               'cat_list' => array('options' => 
$this->bocommon->select_category_list(array(
+                                               'format' => 'select',
+                                               'selected' => $this->cat_id, 
'type' => 's_agreement', 'order' => 'descr'))),
                                'member_of_list2' => $member_of_list,
                                'attributes_group' => $attributes,
                                'lookup_functions' => 
$values['lookup_functions'],
@@ -1655,7 +1436,7 @@
                                'vendor_data' => $vendor_data,
                                'lang_budget' => lang('Budget'),
                                'lang_budget_statustext' => lang('Budget for 
selected year'),
-                               'value_budget' => $values['budget'],
+                               'value_budget' => $values['budget'] ? 
$values['budget'] : '',
                                'currency' => 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
                                'lang_year' => lang('year'),
                                'lang_year_statustext' => lang('Budget year'),

Modified: trunk/property/js/portico/s_agreement.edit.js
===================================================================
--- trunk/property/js/portico/s_agreement.edit.js       2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/js/portico/s_agreement.edit.js       2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -5,6 +5,29 @@
  */
 var sUrl_agreement = phpGWLink('index.php', {'menuaction': 
'property.uis_agreement.edit_alarm'});
 
+$(document).ready(function ()
+{
+       $.formUtils.addValidator({
+               name: 'budget',
+               validatorFunction: function (value, $el, config, languaje, 
$form)
+               {
+                       var v = false;
+                       var budget = $('#field_budget').val();
+                       var ecodimb = $('#field_ecodimb').val();
+                       var category_id = $('#global_category_id').val();
+                       var b_account_id = $('#b_account_id').val();
+
+                       if (budget == "" || (budget != "" && ecodimb != "" && 
category_id != "" && b_account_id != ""))
+                       {
+                               v = true;
+                       }
+                       return v;
+               },
+               errorMessage: '',
+               errorMessageKey: ''
+       });
+});
+
 onActionsClick_notify = function (type, ids, requestUrl)
 {
 
@@ -22,7 +45,7 @@
                        JqueryPortico.updateinlineTableHelper(oTable0, 
requestUrl);
                }
        });
-}
+};
 
 onAddClick_Alarm = function (type)
 {
@@ -53,7 +76,7 @@
        {
                return false;
        }
-}
+};
 
 onUpdateClickAlarm = function (type)
 {
@@ -111,7 +134,7 @@
                        $('#new_index').val('');
                }
        });
-}
+};
 
 onUpdateClickItems = function (type)
 {
@@ -161,7 +184,7 @@
                        $('#new_index').val('');
                }
        });
-}
+};
 
 onActionsClickDeleteLastIndex = function (type)
 {
@@ -185,4 +208,4 @@
                        $('#new_index').val('');
                }
        });
-}
\ No newline at end of file
+};

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2016-03-22 15:33:12 UTC (rev 14858)
+++ trunk/property/setup/phpgw_no.lang  2016-03-23 13:44:44 UTC (rev 14859)
@@ -1260,7 +1260,7 @@
 please enter a apartment id !  property        no      angi leilighet ID
 please enter a building id !   property        no      angi bygg ID
 please enter a invoice num!    property        no      Angi Fakturanummer
-please enter a description!    property        no      angi en beskrivelse!
+please enter a description!    property        no      Angi en beskrivelse!
 please enter a entrance id !   property        no      angi inngang ID
 please enter a index ! property        no      Angi en indeks
 Please enter a title ! property        no      Angi en overskrift
@@ -1735,7 +1735,7 @@
 status id      property        no      Status ID
 statustext     property        no      Statustekst
 statustext not entered!        property        no      Statustekst er ikke 
angitt!
-street name    property        no      gate navn
+street name    property        no      gatenavn
 street number  property        no      gate nr
 subject        property        no      Overskrift
 subject changed        property        no      Emne er endret
@@ -1888,7 +1888,7 @@
 vendor has been added  property        no      Leverandør er lagt til
 vendor id      property        no      Lev ID
 vendor is not defined in order %1      property        no      Leverandør er 
ikke definert i ordre %1
-vendor name    property        no      Leverandør navn
+vendor name    property        no      Leverandørnavn
 vendor reminder        property        no      Leverandør purringer
 version        property        no      versjon
 view apartment property        no      vis leilighet

Modified: trunk/property/templates/base/b_account_form.xsl
===================================================================
--- trunk/property/templates/base/b_account_form.xsl    2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/templates/base/b_account_form.xsl    2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -1,40 +1,40 @@
 
 <!-- $Id$ -->
 <xsl:template name="b_account_form">
-               <xsl:apply-templates select="b_account_data"/>
+       <xsl:apply-templates select="b_account_data"/>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="b_account_data" xmlns:php="http://php.net/xsl";>
-               <script type="text/javascript">
-                       function b_account_lookup()
-                       {
+       <script type="text/javascript">
+               function b_account_lookup()
+               {
                TINY.box.show({iframe:'<xsl:value-of 
select="b_account_link"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
-                       }
-               </script>
-               <xsl:choose>
-                       <xsl:when test="disabled='1'">
+               }
+       </script>
+       <xsl:choose>
+               <xsl:when test="disabled='1'">
                        <div class="pure-control-group">
                                <label>
-                                               <xsl:value-of 
select="lang_b_account"/>
+                                       <xsl:value-of select="lang_b_account"/>
                                </label>
-                                               <input size="9" type="text" 
value="{value_b_account_id}" readonly="readonly"/>
-                                               <input size="30" type="text" 
value="{value_b_account_name}" readonly="readonly"/>
-                                               <input size="9" type="hidden" 
name="b_account_id" value="{value_b_account_id}" readonly="readonly"/>
-                                               <input size="30" type="hidden" 
name="b_account_name" value="{value_b_account_name}" readonly="readonly"/>
+                               <input size="9" type="text" 
value="{value_b_account_id}" readonly="readonly"/>
+                               <input size="30" type="text" 
value="{value_b_account_name}" readonly="readonly"/>
+                               <input size="9" type="hidden" 
name="b_account_id" value="{value_b_account_id}" readonly="readonly"/>
+                               <input size="30" type="hidden" 
name="b_account_name" value="{value_b_account_name}" readonly="readonly"/>
                        </div>
-                       </xsl:when>
-                       <xsl:otherwise>
+               </xsl:when>
+               <xsl:otherwise>
                        <div class="pure-control-group">
                                <label>
                                        <a href="javascript:b_account_lookup()" 
title="{lang_select_b_account_help}">
-                                                       <xsl:value-of 
select="lang_b_account"/>
-                                               </a>
+                                               <xsl:value-of 
select="lang_b_account"/>
+                                       </a>
                                </label>
                                <input size="9" type="text" id="b_account_id" 
name="b_account_id" value="{value_b_account_id}">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_select_b_account_help"/>
-                                                       </xsl:attribute>
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="lang_select_b_account_help"/>
+                                       </xsl:attribute>
                                        <xsl:if test="required='1'">
                                                <xsl:attribute 
name="data-validation">
                                                        
<xsl:text>required</xsl:text>
@@ -43,13 +43,13 @@
                                                        <xsl:value-of 
select="php:function('lang', 'Please select a budget account !')"/>
                                                </xsl:attribute>
                                        </xsl:if>
-                                               </input>
-                                               <input size="30" type="text" 
name="b_account_name" value="{value_b_account_name}" 
onClick="b_account_lookup();" readonly="readonly">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_select_b_account_help"/>
-                                                       </xsl:attribute>
-                                               </input>
+                               </input>
+                               <input size="30" type="text" 
name="b_account_name" value="{value_b_account_name}" 
onClick="b_account_lookup();" readonly="readonly">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="lang_select_b_account_help"/>
+                                       </xsl:attribute>
+                               </input>
                        </div>
-                       </xsl:otherwise>
-               </xsl:choose>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>

Modified: trunk/property/templates/base/cat_select.xsl
===================================================================
--- trunk/property/templates/base/cat_select.xsl        2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/templates/base/cat_select.xsl        2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -41,19 +41,15 @@
 </xsl:template>
 <!-- New template-->
 <xsl:template match="cat_list">
-               <xsl:variable name="id">
-                       <xsl:value-of select="id"/>
-               </xsl:variable>
-               <xsl:choose>
-                       <xsl:when test="selected='selected'">
-                               <option value="{$id}{cat_id}" 
selected="selected">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <option value="{$id}{cat_id}">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:otherwise>
-               </xsl:choose>
+       <xsl:variable name="id">
+               <xsl:value-of select="id"/>
+       </xsl:variable>
+       <option value="{$id}{cat_id}">
+               <xsl:if test="selected='1' or selected='selected'">
+                       <xsl:attribute name="selected">
+                               <xsl:text>selected</xsl:text>
+                       </xsl:attribute>
+               </xsl:if>
+               <xsl:value-of disable-output-escaping="yes" select="name"/>
+       </option>
 </xsl:template>

Modified: trunk/property/templates/base/ecodimb_form.xsl
===================================================================
--- trunk/property/templates/base/ecodimb_form.xsl      2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/templates/base/ecodimb_form.xsl      2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -1,40 +1,40 @@
 
 <!-- $Id$ -->
 <xsl:template name="ecodimb_form">
-               <xsl:apply-templates select="ecodimb_data"/>
+       <xsl:apply-templates select="ecodimb_data"/>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="ecodimb_data" xmlns:php="http://php.net/xsl";>
-               <script type="text/javascript">
-                       function ecodimb_lookup()
-                       {
+       <script type="text/javascript">
+               function ecodimb_lookup()
+               {
                TINY.box.show({iframe:'<xsl:value-of select="ecodimb_url"/>', 
boxid:"frameless",width:750,height:450,fixed:false,maskid:"darkmask",maskopacity:40,
 mask:true, animate:true, close: true});
-                       }
-               </script>
-               <xsl:choose>
-                       <xsl:when test="disabled='1'">
+               }
+       </script>
+       <xsl:choose>
+               <xsl:when test="disabled='1'">
                        <div class="pure-control-group">
                                <label>
-                                               <xsl:value-of 
select="lang_ecodimb"/>
+                                       <xsl:value-of select="lang_ecodimb"/>
                                </label>
-                                               <input size="9" type="text" 
value="{value_ecodimb}" readonly="readonly"/>
-                                               <input size="30" type="text" 
value="{value_ecodimb_descr}" readonly="readonly"/>
-                                               <input size="9" type="hidden" 
name="ecodimb" value="{value_ecodimb}" readonly="readonly"/>
-                                               <input size="30" type="hidden" 
name="ecodimb_descr" value="{value_ecodimb_descr}" readonly="readonly"/>
+                               <input size="9" type="text" 
value="{value_ecodimb}" readonly="readonly"/>
+                               <input size="30" type="text" 
value="{value_ecodimb_descr}" readonly="readonly"/>
+                               <input size="9" type="hidden" name="ecodimb" 
value="{value_ecodimb}" readonly="readonly"/>
+                               <input size="30" type="hidden" 
name="ecodimb_descr" value="{value_ecodimb_descr}" readonly="readonly"/>
                        </div>
-                       </xsl:when>
-                       <xsl:otherwise>
+               </xsl:when>
+               <xsl:otherwise>
                        <div class="pure-control-group">
                                <label>
-                                               <a 
href="javascript:ecodimb_lookup()" title="{lang_select_ecodimb_help}">
-                                                       <xsl:value-of 
select="lang_ecodimb"/>
-                                               </a>
+                                       <a href="javascript:ecodimb_lookup()" 
title="{lang_select_ecodimb_help}">
+                                               <xsl:value-of 
select="lang_ecodimb"/>
+                                       </a>
                                </label>
-                                               <input size="9" type="text" 
name="ecodimb" value="{value_ecodimb}">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_select_ecodimb_help"/>
-                                                       </xsl:attribute>
+                               <input size="9" type="text" id="field_ecodimb" 
name="ecodimb" value="{value_ecodimb}">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="lang_select_ecodimb_help"/>
+                                       </xsl:attribute>
                                        <xsl:if test="required='1'">
                                                <xsl:attribute 
name="data-validation">
                                                        
<xsl:text>required</xsl:text>
@@ -43,13 +43,13 @@
                                                        <xsl:value-of 
select="php:function('lang', 'Please select a value !')"/>
                                                </xsl:attribute>
                                        </xsl:if>
-                                               </input>
-                                               <input size="30" type="text" 
name="ecodimb_descr" value="{value_ecodimb_descr}" onClick="ecodimb_lookup();" 
readonly="readonly">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_select_ecodimb_help"/>
-                                                       </xsl:attribute>
-                                               </input>
+                               </input>
+                               <input size="30" type="text" 
name="ecodimb_descr" value="{value_ecodimb_descr}" onClick="ecodimb_lookup();" 
readonly="readonly">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="lang_select_ecodimb_help"/>
+                                       </xsl:attribute>
+                               </input>
                        </div>
-                       </xsl:otherwise>
-               </xsl:choose>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>

Modified: trunk/property/templates/base/s_agreement.xsl
===================================================================
--- trunk/property/templates/base/s_agreement.xsl       2016-03-22 15:33:12 UTC 
(rev 14858)
+++ trunk/property/templates/base/s_agreement.xsl       2016-03-23 13:44:44 UTC 
(rev 14859)
@@ -1,31 +1,31 @@
   <!-- $Id$ -->
 <xsl:template match="data">
-               <xsl:choose>
+       <xsl:choose>
                <xsl:when test="add">
                        <xsl:apply-templates select="add"/>
                </xsl:when>
-                       <xsl:when test="edit">
-                               <xsl:apply-templates select="edit"/>
-                       </xsl:when>
-                       <xsl:when test="edit_item">
-                               <xsl:apply-templates select="edit_item"/>
-                       </xsl:when>
-                       <xsl:when test="view_item">
-                               <xsl:apply-templates select="view_item"/>
-                       </xsl:when>
-                       <xsl:when test="view">
-                               <xsl:apply-templates select="view"/>
-                       </xsl:when>
-                       <xsl:when test="list_attribute">
-                               <xsl:apply-templates select="list_attribute"/>
-                       </xsl:when>
-                       <xsl:when test="edit_attrib">
-                               <xsl:apply-templates select="edit_attrib"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:apply-templates select="list"/>
-                       </xsl:otherwise>
-               </xsl:choose>
+               <xsl:when test="edit">
+                       <xsl:apply-templates select="edit"/>
+               </xsl:when>
+               <xsl:when test="edit_item">
+                       <xsl:apply-templates select="edit_item"/>
+               </xsl:when>
+               <xsl:when test="view_item">
+                       <xsl:apply-templates select="view_item"/>
+               </xsl:when>
+               <xsl:when test="view">
+                       <xsl:apply-templates select="view"/>
+               </xsl:when>
+               <xsl:when test="list_attribute">
+                       <xsl:apply-templates select="list_attribute"/>
+               </xsl:when>
+               <xsl:when test="edit_attrib">
+                       <xsl:apply-templates select="edit_attrib"/>
+               </xsl:when>
+               <xsl:otherwise>
+                       <xsl:apply-templates select="list"/>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>
 
        <!-- New template-->
@@ -103,7 +103,7 @@
                                <td class="th_text" width="{with}" 
align="{align}">
                                        <xsl:choose>
                                                <xsl:when test="sort_link!=''">
-                                                       <a href="{sort}" 
onMouseover="window.status='{header}';return true;" 
onMouseout="window.status='';return true;">
+                                                       <a href="{sort}" 
onMouseover="window.status='{header}';return true;">
                                                                <xsl:value-of 
select="header"/>
                                                        </a>
                                                </xsl:when>
@@ -137,7 +137,7 @@
                                        <xsl:choose>
                                                <xsl:when test="link">
                                                        <td class="small_text" 
align="center">
-                                                               <a 
href="{link}" onMouseover="window.status='{statustext}';return true;" 
onMouseout="window.status='';return true;">
+                                                               <a 
href="{link}" onMouseover="window.status='{statustext}';return true;">
                                                                        
<xsl:value-of select="text"/>
                                                                </a>
                                                        </td>
@@ -154,7 +154,7 @@
                                                <td align="center">
                                                        <input type="hidden" 
name="values[item_id][{item_id}]" value="{item_id}"/>
                                                        <input type="hidden" 
name="values[id][{item_id}]" value="{index_count}"/>
-                                                       <input type="checkbox" 
name="values[select][{item_id}]" value="{cost}" 
onMouseout="window.status='';return true;">
+                                                       <input type="checkbox" 
name="values[select][{item_id}]" value="{cost}">
                                                                <xsl:attribute 
name="onMouseover">
                                                                        
<xsl:text>window.status='</xsl:text>
                                                                        
<xsl:value-of select="lang_select_statustext"/>
@@ -189,7 +189,7 @@
                                        <xsl:choose>
                                                <xsl:when test="link">
                                                        <td class="small_text" 
align="center">
-                                                               <a 
href="{link}" onMouseover="window.status='{statustext}';return true;" 
onMouseout="window.status='';return true;">
+                                                               <a 
href="{link}" onMouseover="window.status='{statustext}';return true;">
                                                                        
<xsl:value-of select="text"/>
                                                                </a>
                                                        </td>
@@ -215,107 +215,122 @@
        <!-- New template-->
        <xsl:template match="table_add">
                <div class="pure-control-group">
-                               <xsl:variable name="add_action">
-                                       <xsl:value-of select="add_action"/>
-                               </xsl:variable>
-                               <xsl:variable name="lang_add">
-                                       <xsl:value-of select="lang_add"/>
-                               </xsl:variable>
-                               <form method="post" action="{$add_action}">
-                                       <input class="pure-button 
pure-button-primary" type="submit" name="add" value="{$lang_add}" 
onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                       <xsl:value-of 
select="lang_add_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                       </input>
-                               </form>
+                       <xsl:variable name="add_action">
+                               <xsl:value-of select="add_action"/>
+                       </xsl:variable>
+                       <xsl:variable name="lang_add">
+                               <xsl:value-of select="lang_add"/>
+                       </xsl:variable>
+                       <form method="post" action="{$add_action}">
+                               <input class="pure-button pure-button-primary" 
type="submit" name="add" value="{$lang_add}">
+                                       <xsl:attribute name="onMouseover">
+                                               
<xsl:text>window.status='</xsl:text>
+                                               <xsl:value-of 
select="lang_add_statustext"/>
+                                               <xsl:text>'; return 
true;</xsl:text>
+                                       </xsl:attribute>
+                               </input>
+                       </form>
                </div>
        </xsl:template>
 
        <!-- add / edit -->
-       <!--xsl:template match="edit" xmlns:php="http://php.net/xsl"-->
-        <xsl:template match="edit">
+        <xsl:template match="edit" xmlns:php="http://php.net/xsl";>
                <script type="text/javascript">
                        self.name="first_Window";
                        <xsl:value-of select="lookup_functions"/>
                </script>
-               <!--div class="yui-navset" id="edit_tabview"-->
-                <dl>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="msgbox_data != ''">
-                                <dt>
-                                                                               
        <xsl:call-template name="msgbox"/>
-                                </dt>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                </dl>
-                <div id="tab-content">
+               <div id="tab-content">
                        <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
                             <div id="general">
                                <xsl:variable name="edit_url">
                                        <xsl:value-of select="edit_url"/>
                                </xsl:variable>
                                <form ENCTYPE="multipart/form-data" 
method="post" name="form" id="form" action="{$edit_url}" class="pure-form 
pure-form-aligned">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_s_agreement_id!=''">
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_s_agreement_id!=''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                               
        <xsl:value-of select="lang_id"/>
+                                                                       
<xsl:value-of select="lang_id"/>
                                                                </label>
-                                                                               
        <xsl:value-of select="value_s_agreement_id"/>
+                                                               <xsl:value-of 
select="value_s_agreement_id"/>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_name"/>
+                                                       <xsl:value-of 
select="lang_name"/>
                                                </label>
-                                                                       <input 
type="text" name="values[name]" value="{value_name}" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_name_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" 
name="values[name]" value="{value_name}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_name_statustext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>required</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation-error-msg">
+                                                               <xsl:value-of 
select="php:function('lang', 'please enter a name !')"/>
+                                                       </xsl:attribute>
+
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_descr"/>
+                                                       <xsl:value-of 
select="lang_descr"/>
                                                </label>
-                                                                       
<textarea cols="60" rows="6" name="values[descr]">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_descr_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_descr"/>
-                                                                       
</textarea>
+                                               <textarea cols="60" rows="6" 
name="values[descr]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_descr_statustext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>required</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation-error-msg">
+                                                               <xsl:value-of 
select="php:function('lang', 'please enter a description!')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_descr"/>
+                                               </textarea>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_category"/>
+                                                       <xsl:value-of 
select="lang_category"/>
                                                </label>
-                                                                       
<xsl:call-template name="cat_select"/>
+                                               <select id="cat_id" 
name="values[cat_id]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Select the category the s_agreement belongs to. 
To do not use a category select NO CATEGORY')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>required</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation-error-msg">
+                                                               <xsl:value-of 
select="php:function('lang', 'Please select a category !')"/>
+                                                       </xsl:attribute>
+
+                                                       <option value=''>
+                                                               <xsl:value-of 
select="php:function('lang', 'no category')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="cat_list/options"/>
+                                               </select>
                                        </div>
-                                                       <xsl:call-template 
name="vendor_form"/>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="member_of_list2 != ''">
+                                       <xsl:call-template name="vendor_form"/>
+                                       <xsl:choose>
+                                               <xsl:when test="member_of_list2 
!= ''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'member of')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'member of')"/>
                                                                </label>
                                                                <label 
style="vertical-align:top;">
-                                                                               
        <div id="member_of">
-                                                                               
                <xsl:apply-templates select="member_of_list2"/>
-                                                                               
        </div>
+                                                                       <div 
id="member_of">
+                                                                               
<xsl:apply-templates select="member_of_list2"/>
+                                                                       </div>
                                                                </label>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_budget"/>
+                                                       <xsl:value-of 
select="lang_budget"/>
                                                </label>
-                                               <input type="text" 
name="values[budget]" value="{value_budget}" 
onMouseout="window.status='';return true;">
+                                               <input id="field_budget" 
type="text" name="values[budget]" value="{value_budget}">
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="lang_budget_statustext"/>
                                                        </xsl:attribute>
@@ -324,61 +339,67 @@
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_year"/>
+                                                       <xsl:value-of 
select="lang_year"/>
                                                </label>
-                                                                       <select 
name="values[year]" class="forms" title="{lang_year_statustext}">
-                                                                               
<xsl:apply-templates select="year"/>
-                                                                       
</select>
+                                               <select name="values[year]" 
class="forms" title="{lang_year_statustext}">
+                                                       <xsl:apply-templates 
select="year"/>
+                                               </select>
                                        </div>
-                                                       <xsl:call-template 
name="ecodimb_form"/>
-                                                       <xsl:call-template 
name="b_account_form"/>
+                                       <xsl:call-template name="ecodimb_form"/>
+                                       <xsl:call-template 
name="b_account_form"/>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_category"/>
+                                                       <xsl:value-of 
select="lang_category"/>
                                                </label>
-                                                                       
<xsl:call-template name="categories"/>
+                                               <xsl:call-template 
name="categories"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_start_date"/>
+                                                       <xsl:value-of 
select="lang_start_date"/>
                                                </label>
-                                                                       <input 
type="text" id="values_start_date" name="values[start_date]" size="10" 
value="{value_start_date}" readonly="readonly" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_start_date_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" 
id="values_start_date" name="values[start_date]" size="10" 
value="{value_start_date}" readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_start_date_statustext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>required</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation-error-msg">
+                                                               <xsl:value-of 
select="php:function('lang', 'start date')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_end_date"/>
+                                                       <xsl:value-of 
select="lang_end_date"/>
                                                </label>
-                                                                       <input 
type="text" id="values_end_date" name="values[end_date]" size="10" 
value="{value_end_date}" readonly="readonly" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_end_date_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" 
id="values_end_date" name="values[end_date]" size="10" value="{value_end_date}" 
readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_end_date_statustext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>required</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="data-validation-error-msg">
+                                                               <xsl:value-of 
select="php:function('lang', 'end date')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_termination_date"/>
+                                                       <xsl:value-of 
select="lang_termination_date"/>
                                                </label>
-                                                                       <input 
type="text" id="values_termination_date" name="values[termination_date]" 
size="10" value="{value_termination_date}" readonly="readonly" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_termination_date_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" 
id="values_termination_date" name="values[termination_date]" size="10" 
value="{value_termination_date}" readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_termination_date_statustext"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_budget"/>
+                                                       <xsl:value-of 
select="lang_budget"/>
                                                </label>
-                                                                       <!-- 
DataTable 2 EDIT -->
+                                               <!-- DataTable 2 EDIT -->
                                                <!--div 
id="datatable-container_3"/-->
                                                <div class="pure-custom">
                                                        <xsl:for-each 
select="datatable_def">
@@ -396,16 +417,16 @@
                                                </div>
                                        </div>
                                        <div class="pure-control-group">
-                                                                       
<xsl:call-template name="attributes_values"/>
+                                               <xsl:call-template 
name="attributes_values"/>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="files!=''">
-                                                                       <!-- 
<xsl:call-template name="file_list"/> -->
+                                       <xsl:choose>
+                                               <xsl:when test="files!=''">
+                                                       <!-- <xsl:call-template 
name="file_list"/> -->
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                               
        <xsl:value-of select="//lang_files"/>
+                                                                       
<xsl:value-of select="//lang_files"/>
                                                                </label>
-                                                                               
        <!-- DataTable 2 EDIT -->
+                                                               <!-- DataTable 
2 EDIT -->
                                                                <!--div 
id="datatable-container_2"/-->
                                                                <div 
class="pure-custom">
                                                                        
<xsl:for-each select="datatable_def">
@@ -429,40 +450,40 @@
                                                                        
<xsl:call-template name="file_upload"/>
                                                                </xsl:when>
                                                        </xsl:choose>
-                                       <div class="pure-control-group">
-                                                                       
<xsl:variable name="lang_save">
-                                                                               
<xsl:value-of select="lang_save"/>
-                                                                       
</xsl:variable>
-                                               <input type="submit" 
class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}" onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_save_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                                       <div 
class="pure-control-group">
+                                                               <xsl:variable 
name="lang_save">
+                                                                       
<xsl:value-of select="lang_save"/>
+                                                               </xsl:variable>
+                                                               <input 
type="submit" class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_save_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                                         
-                                                                       
<xsl:variable name="lang_apply">
-                                                                               
<xsl:value-of select="lang_apply"/>
-                                                                       
</xsl:variable>
-                                               <input type="submit" 
class="pure-button pure-button-primary" name="values[apply]" 
value="{$lang_apply}" onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_apply_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                                               <xsl:variable 
name="lang_apply">
+                                                                       
<xsl:value-of select="lang_apply"/>
+                                                               </xsl:variable>
+                                                               <input 
type="submit" class="pure-button pure-button-primary" name="values[apply]" 
value="{$lang_apply}">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_apply_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                                         
-                                                                       
<xsl:variable name="lang_cancel">
-                                                                               
<xsl:value-of select="lang_cancel"/>
-                                                                       
</xsl:variable>
-                                               <input type="button" 
class="pure-button pure-button-primary" name="values[cancel]" 
value="{$lang_cancel}" onMouseout="window.status='';return true;" 
onClick="document.cancel_form.submit();">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_cancel_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                       </div>
+                                                               <xsl:variable 
name="lang_cancel">
+                                                                       
<xsl:value-of select="lang_cancel"/>
+                                                               </xsl:variable>
+                                                               <input 
type="button" class="pure-button pure-button-primary" name="values[cancel]" 
value="{$lang_cancel}" onClick="document.cancel_form.submit();">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_cancel_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </div>
                                        </form>
                                        <xsl:variable name="cancel_url">
                                                <xsl:value-of 
select="cancel_url"/>
@@ -503,24 +524,24 @@
                                                                        
<xsl:value-of select="alarm_data/add_alarm/lang_user"/>
                                                        </div>
                                                        <div 
class="pure-control-group">
-                                                                       <!--div 
id="datatable-buttons_1"/-->
-                                                                    <select 
name="values[alarm_data/add_alarm/day_list]" class="form" 
title="{lang_days_statustext}" id="day_list">
-                                                                            
<xsl:apply-templates select="alarm_data/add_alarm/day_list"/>
-                                                                    </select>
+                                                               <!--div 
id="datatable-buttons_1"/-->
+                                                               <select 
name="values[alarm_data/add_alarm/day_list]" class="form" 
title="{lang_days_statustext}" id="day_list">
+                                                                       
<xsl:apply-templates select="alarm_data/add_alarm/day_list"/>
+                                                               </select>
                                                                     
-                                                                    <select 
name="values[alarm_data/add_alarm/hour_list]" class="form" 
title="{alarm_data/add_alarm/lang_hour_statustext}" id="hour_list">
+                                                               <select 
name="values[alarm_data/add_alarm/hour_list]" class="form" 
title="{alarm_data/add_alarm/lang_hour_statustext}" id="hour_list">
                                                                        
<xsl:apply-templates select="alarm_data/add_alarm/hour_list"/>
-                                                                    </select>
+                                                               </select>
                                                                     
-                                                                    <select 
name="values[alarm_data/add_alarm/minute_list]" class="form" 
title="{alarm_data/add_alarm/lang_minute_statustext}" id="minute_list">
+                                                               <select 
name="values[alarm_data/add_alarm/minute_list]" class="form" 
title="{alarm_data/add_alarm/lang_minute_statustext}" id="minute_list">
                                                                        
<xsl:apply-templates select="alarm_data/add_alarm/minute_list"/>
-                                                                    </select>
+                                                               </select>
                                                                     
-                                                                    <select 
name="values[alarm_data/add_alarm/user_list]" class="form" 
title="{alarm_data/add_alarm/lang_user}" id="user_list">
+                                                               <select 
name="values[alarm_data/add_alarm/user_list]" class="form" 
title="{alarm_data/add_alarm/lang_user}" id="user_list">
                                                                        
<xsl:apply-templates select="alarm_data/add_alarm/user_list"/>
-                                                                    </select>
-                                                                    <input 
type="hidden" id="agreementid" name="agreementid" 
value="{value_s_agreement_id}" />
-                                                                    <input 
type="button" name="" value="Add" id="values[add_alarm]" 
onClick="onAddClick_Alarm('add_alarm');"/>
+                                                               </select>
+                                                               <input 
type="hidden" id="agreementid" name="agreementid" 
value="{value_s_agreement_id}" />
+                                                               <input 
type="button" name="" value="Add" id="values[add_alarm]" 
onClick="onAddClick_Alarm('add_alarm');"/>
                                                        </div>
                                                </fieldset>
                                        </form>
@@ -553,60 +574,60 @@
                                                        myButtons[<xsl:value-of 
select="name"/>] = <xsl:value-of select="values"/>
                                                </xsl:for-each>
                        </script-->
-                                               <xsl:choose>
-                                                       <xsl:when 
test="value_s_agreement_id!=''">
+                       <xsl:choose>
+                               <xsl:when test="value_s_agreement_id!=''">
                                        <div class="pure-control-group">
-                                                                               
<form ENCTYPE="multipart/form-data" method="post" name="form" 
action="{link_import}">
-                                                                               
        <input type="hidden" name="id" value="{value_s_agreement_id}"/>
+                                               <form 
ENCTYPE="multipart/form-data" method="post" name="form" action="{link_import}">
+                                                       <input type="hidden" 
name="id" value="{value_s_agreement_id}"/>
                                                        <div 
class="pure-control-group">
                                                                <label 
title="{lang_detail_import_statustext}" style="cursor: help;">
-                                                                               
                                <xsl:value-of select="lang_import_detail"/>
+                                                                       
<xsl:value-of select="lang_import_detail"/>
                                                                </label>
-                                                                               
                                <input type="file" name="importfile" size="40" 
onMouseout="window.status='';return true;">
-                                                                               
                                        <xsl:attribute name="onMouseover">
-                                                                               
                                                
<xsl:text>window.status='</xsl:text>
-                                                                               
                                                <xsl:value-of 
select="lang_detail_import_statustext"/>
-                                                                               
                                                <xsl:text>'; return 
true;</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </input>
-                                                                               
                                <xsl:text> </xsl:text>
-                                                                               
                                <xsl:variable name="lang_import">
-                                                                               
                                        <xsl:value-of select="lang_import"/>
-                                                                               
                                </xsl:variable>
-                                                                               
                                <input type="submit" name="detail_import" 
value="{$lang_import}" onMouseout="window.status='';return true;">
-                                                                               
                                        <xsl:attribute name="onMouseover">
-                                                                               
                                                
<xsl:text>window.status='</xsl:text>
-                                                                               
                                                <xsl:value-of 
select="lang_detail_import_statustext"/>
-                                                                               
                                                <xsl:text>'; return 
true;</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </input>
+                                                               <input 
type="file" name="importfile" size="40">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_detail_import_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                               <xsl:text> 
</xsl:text>
+                                                               <xsl:variable 
name="lang_import">
+                                                                       
<xsl:value-of select="lang_import"/>
+                                                               </xsl:variable>
+                                                               <input 
type="submit" name="detail_import" value="{$lang_import}">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_detail_import_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                        </div>
-                                                                               
</form>
-                                                                               
<xsl:variable name="link_download">
-                                                                               
        <xsl:value-of select="link_download"/>
-                                                                               
</xsl:variable>
-                                                                               
<xsl:variable name="lang_download_help">
-                                                                               
        <xsl:value-of select="lang_download_help"/>
-                                                                               
</xsl:variable>
-                                                                               
<xsl:variable name="lang_download">
-                                                                               
        <xsl:value-of select="lang_download"/>
-                                                                               
</xsl:variable>
-                                                                               
<a href="javascript:var w=window.open('{$link_download}','','left=50,top=100')" 
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')" 
onMouseOut="nd()">
-                                                                               
        <xsl:value-of select="lang_download"/>
-                                                                               
</a>
+                                               </form>
+                                               <xsl:variable 
name="link_download">
+                                                       <xsl:value-of 
select="link_download"/>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_download_help">
+                                                       <xsl:value-of 
select="lang_download_help"/>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_download">
+                                                       <xsl:value-of 
select="lang_download"/>
+                                               </xsl:variable>
+                                               <a href="javascript:var 
w=window.open('{$link_download}','','left=50,top=100')" 
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')" 
onMouseOut="nd()">
+                                                       <xsl:value-of 
select="lang_download"/>
+                                               </a>
                                        </div>
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                       <xsl:choose>
-                                               <xsl:when 
test="table_update!=''">
-                                                       <xsl:variable 
name="update_action">
-                                                               <xsl:value-of 
select="update_action"/>
-                                                       </xsl:variable>
-                                                       <form method="post" 
name="form2" action="{$update_action}">
+                               </xsl:when>
+                       </xsl:choose>
+                       <xsl:choose>
+                               <xsl:when test="table_update!=''">
+                                       <xsl:variable name="update_action">
+                                               <xsl:value-of 
select="update_action"/>
+                                       </xsl:variable>
+                                       <form method="post" name="form2" 
action="{$update_action}">
                                                <div class="pure-control-group">
-                                                               <input 
type="hidden" name="values[agreement_id]" value="{value_s_agreement_id}"/>
-                                                               <!-- DataTable 
1 EDIT -->
-                                                               <div 
id="paging_1"> </div>
+                                                       <input type="hidden" 
name="values[agreement_id]" value="{value_s_agreement_id}"/>
+                                                       <!-- DataTable 1 EDIT 
-->
+                                                       <div id="paging_1"> 
</div>
                                                        <!--div 
id="datatable-container_1"/-->
                                                        <div 
class="pure-custom">
                                                                <xsl:for-each 
select="datatable_def">
@@ -622,207 +643,219 @@
                                                                        
</xsl:if>
                                                                </xsl:for-each>
                                                        </div>
-                                                               <div 
id="contextmenu_1"/>
+                                                       <div 
id="contextmenu_1"/>
                                                </div>
                                                <br/>
                                                <div class="pure-control-group">
-                                                               <div 
id="datatable-buttons_2" class="div-buttons">
-                                                                       <input 
type="text" id="values_date" class="calendar-opt" name="values[date]" size="10" 
value="{date}" readonly="readonly">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_date_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                                       <div 
id="datatable-buttons_2" class="div-buttons">
+                                                               <input 
type="text" id="values_date" class="calendar-opt" name="values[date]" size="10" 
value="{date}" readonly="readonly">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_date_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                                <div 
style="width:25px;height:15px;position:relative;float:left;"></div>
                                                                <input 
id="new_index" class="mybottonsUpdates" type="text" name="values[new_index]" 
size="12"/>
                                                                <input 
id="hd_values[update]" class="" type="hidden" name="values[update]" 
value="Update"/>
                                                                <input 
type="button" name="" value="Update" id="values[update]" 
onClick="onUpdateClickAlarm('update');"/>
                                                        </div>
-                                                               </div>
-                                                               <style 
type="text/css">
-                                                                       
.calendar-opt
-                                                                       {
-                                                                               
position:relative;
-                                                                               
float:left;
-                                                                       }
-                                                                       
.index-opt
-                                                                       {
-                                                                               
position:relative;
-                                                                               
float:left;
-                                                                               
margin-top:2px;
-                                                                       }
-                                                                       
.div-buttons
-                                                                       {
+                                               </div>
+                                               <style type="text/css">
+                                                       .calendar-opt
+                                                       {
+                                                       position:relative;
+                                                       float:left;
+                                                       }
+                                                       .index-opt
+                                                       {
+                                                       position:relative;
+                                                       float:left;
+                                                       margin-top:2px;
+                                                       }
+                                                       .div-buttons
+                                                       {
                                                        height:50px;
-                                                                       }
-                                                               </style>
-                                                       </form>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <xsl:choose>
-                                               <xsl:when 
test="value_s_agreement_id!=''">
+                                                       }
+                                               </style>
+                                       </form>
+                               </xsl:when>
+                       </xsl:choose>
+                       <xsl:choose>
+                               <xsl:when test="value_s_agreement_id!=''">
                                        <!--table width="100%" cellpadding="2" 
cellspacing="2" align="center"-->
-                                                               
<xsl:apply-templates select="table_add"/>
+                                       <xsl:apply-templates 
select="table_add"/>
                                        <!--/table-->
-                                               </xsl:when>
-                                       </xsl:choose>
-                               </div>
-                       </div>
+                               </xsl:when>
+                       </xsl:choose>
+               </div>
+               </div>
+               <xsl:variable name="lang_budget_validation">
+                       <xsl:value-of select="php:function('lang', 'budget 
info')" />
+               </xsl:variable>
+
+       <script type="text/javascript">
+               
$('#b_account_id').attr("data-validation","budget").attr("data-validation-error-msg",
 "<xsl:value-of select="$lang_budget_validation" />");
+               
$('#field_ecodimb').attr("data-validation","budget").attr("data-validation-error-msg",
 "<xsl:value-of select="$lang_budget_validation" />");
+               
$('#global_category_id').attr("data-validation","budget").attr("data-validation-error-msg",
 "<xsl:value-of select="$lang_budget_validation" />");
+               
$('#field_budget').attr("data-validation","budget").attr("data-validation-error-msg",
 "<xsl:value-of select="$lang_budget_validation" />");
+
+       </script>
+
 </xsl:template>
 
 <!-- add item / edit item -->
 <xsl:template match="edit_item">
-               <script type="text/javascript">
-                       self.name="first_Window";
-                       <xsl:value-of select="lookup_functions"/>
-               </script>
-               <script type="text/javascript">
-                       var property_js = <xsl:value-of select="property_js"/>;
-                       var base_java_url = <xsl:value-of 
select="base_java_url"/>;
-                       var datatable = new Array();
-                       var myColumnDefs = new Array();
-                       var myButtons = new Array();
+       <script type="text/javascript">
+               self.name="first_Window";
+               <xsl:value-of select="lookup_functions"/>
+       </script>
+       <script type="text/javascript">
+               var property_js = <xsl:value-of select="property_js"/>;
+               var base_java_url = <xsl:value-of select="base_java_url"/>;
+               var datatable = new Array();
+               var myColumnDefs = new Array();
+               var myButtons = new Array();
 
-                       <xsl:for-each select="datatable">
-                               datatable[<xsl:value-of select="name"/>] = [
-                                       {
-                                               values:<xsl:value-of 
select="values"/>,
-                                               total_records: <xsl:value-of 
select="total_records"/>,
-                                               is_paginator:  <xsl:value-of 
select="is_paginator"/>,
-                                               permission:<xsl:value-of 
select="permission"/>,
-                                               footer:<xsl:value-of 
select="footer"/>
-                                       }
-                               ]
-                       </xsl:for-each>
+               <xsl:for-each select="datatable">
+                       datatable[<xsl:value-of select="name"/>] = [
+                       {
+                       values:<xsl:value-of select="values"/>,
+                       total_records: <xsl:value-of select="total_records"/>,
+                       is_paginator:  <xsl:value-of select="is_paginator"/>,
+                       permission:<xsl:value-of select="permission"/>,
+                       footer:<xsl:value-of select="footer"/>
+                       }
+                       ]
+               </xsl:for-each>
 
-                       <xsl:for-each select="myColumnDefs">
-                               myColumnDefs[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
-                       </xsl:for-each>
-                       <xsl:for-each select="myButtons">
-                               myButtons[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
-                       </xsl:for-each>
-               </script>
+               <xsl:for-each select="myColumnDefs">
+                       myColumnDefs[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
+               </xsl:for-each>
+               <xsl:for-each select="myButtons">
+                       myButtons[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
+               </xsl:for-each>
+       </script>
        <div id="tab-content">
                <xsl:value-of disable-output-escaping="yes" select="tabs"/>
                <div id="general">
-                               <xsl:variable name="edit_url">
-                                       <xsl:value-of select="edit_url"/>
-                               </xsl:variable>
+                       <xsl:variable name="edit_url">
+                               <xsl:value-of select="edit_url"/>
+                       </xsl:variable>
                        <form name="form" method="post" class="pure-form 
pure-form-aligned" action="{$edit_url}">
                                <dl>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="msgbox_data != ''">
+                                       <xsl:choose>
+                                               <xsl:when test="msgbox_data != 
''">
                                                        <dt>
-                                                                               
<xsl:call-template name="msgbox"/>
+                                                               
<xsl:call-template name="msgbox"/>
                                                        </dt>
-                                                       </xsl:when>
-                                               </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                </dl>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="value_s_agreement_id!=''">
+                               <xsl:choose>
+                                       <xsl:when 
test="value_s_agreement_id!=''">
                                                <div class="pure-control-group">
                                                        <label>
-                                                                               
<xsl:value-of select="lang_agreement"/>
+                                                               <xsl:value-of 
select="lang_agreement"/>
                                                        </label>
-                                                                               
<xsl:value-of select="value_s_agreement_id"/>
-                                                                               
<xsl:text> [</xsl:text>
-                                                                               
<xsl:value-of select="agreement_name"/>
-                                                                               
<xsl:text>] </xsl:text>
+                                                       <xsl:value-of 
select="value_s_agreement_id"/>
+                                                       <xsl:text> [</xsl:text>
+                                                       <xsl:value-of 
select="agreement_name"/>
+                                                       <xsl:text>] </xsl:text>
                                                </div>
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="value_id!=''">
+                                       </xsl:when>
+                               </xsl:choose>
+                               <xsl:choose>
+                                       <xsl:when test="value_id!=''">
                                                <div class="pure-control-group">
                                                        <label>
-                                                                               
<xsl:value-of select="lang_id"/>
+                                                               <xsl:value-of 
select="lang_id"/>
                                                        </label>
-                                                                               
<xsl:value-of select="value_id"/>
+                                                       <xsl:value-of 
select="value_id"/>
                                                </div>
-                                                       </xsl:when>
-                                               </xsl:choose>
-                                               <xsl:call-template 
name="location_form"/>
+                                       </xsl:when>
+                               </xsl:choose>
+                               <xsl:call-template name="location_form"/>
                                <div class="pure-control-group">
                                        <label>
-                                                               <xsl:value-of 
select="lang_cost"/>
+                                               <xsl:value-of 
select="lang_cost"/>
                                        </label>
-                                                               <input 
type="text" name="values[cost]" value="{value_cost}" 
onMouseout="window.status='';return true;">
-                                                                       
<xsl:attribute name="onMouseover">
-                                                                               
<xsl:text>window.status='</xsl:text>
-                                                                               
<xsl:value-of select="lang_cost_statustext"/>
-                                                                               
<xsl:text>'; return true;</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </input>
+                                       <input type="text" name="values[cost]" 
value="{value_cost}">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_cost_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
                                </div>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="attributes_group != ''">
+                               <xsl:choose>
+                                       <xsl:when test="attributes_group != ''">
                                                <div class="pure-control-group">
-                                                                               
<xsl:call-template name="attributes_values"/>
+                                                       <xsl:call-template 
name="attributes_values"/>
                                                </div>
-                                                       </xsl:when>
-                                               </xsl:choose>
+                                       </xsl:when>
+                               </xsl:choose>
                                <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_save">
-                                                                       
<xsl:value-of select="lang_save"/>
-                                                               </xsl:variable>
-                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[save]" value="{$lang_save}" 
onMouseout="window.status='';return true;">
-                                                                       
<xsl:attribute name="onMouseover">
-                                                                               
<xsl:text>window.status='</xsl:text>
-                                                                               
<xsl:value-of select="lang_save_statustext"/>
-                                                                               
<xsl:text>'; return true;</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </input>
-                                                               <xsl:variable 
name="lang_apply">
-                                                                       
<xsl:value-of select="lang_apply"/>
-                                                               </xsl:variable>
-                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[apply]" value="{$lang_apply}" 
onMouseout="window.status='';return true;">
-                                                                       
<xsl:attribute name="onMouseover">
-                                                                               
<xsl:text>window.status='</xsl:text>
-                                                                               
<xsl:value-of select="lang_apply_statustext"/>
-                                                                               
<xsl:text>'; return true;</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </input>
-                                                               <xsl:variable 
name="lang_cancel">
-                                                                       
<xsl:value-of select="lang_cancel"/>
-                                                               </xsl:variable>
-                                       <input type="submit"  
class="pure-button pure-button-primary" name="values[cancel]" 
value="{$lang_cancel}" onMouseout="window.status='';return true;">
-                                                                       
<xsl:attribute name="onMouseover">
-                                                                               
<xsl:text>window.status='</xsl:text>
-                                                                               
<xsl:value-of select="lang_cancel_statustext"/>
-                                                                               
<xsl:text>'; return true;</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </input>
+                                       <xsl:variable name="lang_save">
+                                               <xsl:value-of 
select="lang_save"/>
+                                       </xsl:variable>
+                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[save]" value="{$lang_save}">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_save_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                                       <xsl:variable name="lang_apply">
+                                               <xsl:value-of 
select="lang_apply"/>
+                                       </xsl:variable>
+                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[apply]" value="{$lang_apply}">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_apply_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                                       <xsl:variable name="lang_cancel">
+                                               <xsl:value-of 
select="lang_cancel"/>
+                                       </xsl:variable>
+                                       <input type="submit"  
class="pure-button pure-button-primary" name="values[cancel]" 
value="{$lang_cancel}">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_cancel_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
                                </div>
-                               </form>
-                               <style type="text/css">
-                                       .calendar-opt
-                                       {
-                                               position:relative;
-                                               float:left;
-                                       }
-                                       .index-opt
-                                       {
-                                               position:relative;
-                                               float:left;
-                                               margin-top:2px;
-                                       }
-                                       .div-buttons
-                                       {
-                                               position:relative;
-                                               float:left;
-                                               width:750px;
-                                               height:100px;
-                                       }
-                               </style>
-                               <xsl:choose>
-                                       <xsl:when test="values != ''">
-                                               <xsl:variable 
name="update_action">
-                                                       <xsl:value-of 
select="update_action"/>
-                                               </xsl:variable>
-                                               <form method="post" 
name="form2" action="{$update_action}">
-                                                       <input type="hidden" 
name="values[agreement_id]" value="{value_s_agreement_id}"/>
-                                                       <input type="hidden" 
name="values[item_id]" value="{value_id}"/>
+                       </form>
+                       <style type="text/css">
+                               .calendar-opt
+                               {
+                               position:relative;
+                               float:left;
+                               }
+                               .index-opt
+                               {
+                               position:relative;
+                               float:left;
+                               margin-top:2px;
+                               }
+                               .div-buttons
+                               {
+                               position:relative;
+                               float:left;
+                               width:750px;
+                               height:100px;
+                               }
+                       </style>
+                       <xsl:choose>
+                               <xsl:when test="values != ''">
+                                       <xsl:variable name="update_action">
+                                               <xsl:value-of 
select="update_action"/>
+                                       </xsl:variable>
+                                       <form method="post" name="form2" 
action="{$update_action}">
+                                               <input type="hidden" 
name="values[agreement_id]" value="{value_s_agreement_id}"/>
+                                               <input type="hidden" 
name="values[item_id]" value="{value_id}"/>
                                                <fieldset>
-                                                               <div 
id="contextmenu_0"/>
+                                                       <div 
id="contextmenu_0"/>
                                                        <div 
class="pure-control-group">
                                                                <!--div 
id="datatable-container_0"/></div-->
                                                                <div 
class="pure-custom">
@@ -841,40 +874,40 @@
                                                                </div>
                                                        </div>
                                                        <div 
class="pure-control-group">
-                                                                               
<div id="datatable-buttons_0" class="div-buttons">
-                                                                               
        <input type="text" class="calendar-opt" id="values_date" 
name="values[date]" size="10" value="{date}" readonly="readonly" 
onMouseout="window.status='';return true;">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="lang_date_statustext"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
+                                                               <div 
id="datatable-buttons_0" class="div-buttons">
+                                                                       <input 
type="text" class="calendar-opt" id="values_date" name="values[date]" size="10" 
value="{date}" readonly="readonly">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="lang_date_statustext"/>
+                                                                               
</xsl:attribute>
+                                                                       </input>
                                                                        <div 
style="width:25px;height:15px;position:relative;float:left;"></div>
                                                                        <input 
type="hidden" id="agreementid" name="agreementid" 
value="{value_s_agreement_id}" />
                                                                        <input 
id="new_index" class="mybottonsUpdates" type="inputText" 
name="values[new_index]" size="12"/>
                                                                        <input 
type="button" name="" value="Update" id="values[update]" 
onClick="onUpdateClickItems('update_item');"/>
                                                                        <input 
type="button" name="" value="delete las index" id="values[delete]" 
onClick="onActionsClickDeleteLastIndex('delete_item');"/>
-                                                                               
</div>
+                                                               </div>
                                                        </div>
                                                </fieldset>
-                                               </form>
-                                       </xsl:when>
-                               </xsl:choose>
-                       </div>
+                                       </form>
+                               </xsl:when>
+                       </xsl:choose>
                </div>
+       </div>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="table_update">
-               <tr>
-                       <td>
-                               <div id="datatable-buttons_0">
-                                       <input type="text" id="values_date" 
name="values[date]" class="actionsFilter" size="10" value="{date}" 
readonly="readonly" onMouseout="window.status='';return true;">
-                                               <xsl:attribute name="title">
-                                                       <xsl:value-of 
select="lang_date_statustext"/>
-                                               </xsl:attribute>
-                                       </input>
-                               </div>
-                       </td>
-               </tr>
+       <tr>
+               <td>
+                       <div id="datatable-buttons_0">
+                               <input type="text" id="values_date" 
name="values[date]" class="actionsFilter" size="10" value="{date}" 
readonly="readonly">
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="lang_date_statustext"/>
+                                       </xsl:attribute>
+                               </input>
+                       </div>
+               </td>
+       </tr>
 </xsl:template>
 
 <!-- view -->
@@ -884,32 +917,32 @@
                <xsl:value-of select="lookup_functions"/>
        </script>
        <div id="tab-content">
-                       <script type="text/javascript">
-                               var property_js = <xsl:value-of 
select="property_js"/>;
-                               var base_java_url = <xsl:value-of 
select="base_java_url"/>;
-                               var datatable = new Array();
-                               var myColumnDefs = new Array();
-                               var myButtons = new Array();
+               <script type="text/javascript">
+                       var property_js = <xsl:value-of select="property_js"/>;
+                       var base_java_url = <xsl:value-of 
select="base_java_url"/>;
+                       var datatable = new Array();
+                       var myColumnDefs = new Array();
+                       var myButtons = new Array();
 
-                               <xsl:for-each select="datatable">
-                                       datatable[<xsl:value-of 
select="name"/>] = [
-                                               {
-                                                       values:<xsl:value-of 
select="values"/>,
-                                                       total_records: 
<xsl:value-of select="total_records"/>,
-                                                       is_paginator:  
<xsl:value-of select="is_paginator"/>,
-                                                       
permission:<xsl:value-of select="permission"/>,
-                                                       footer:<xsl:value-of 
select="footer"/>
-                                               }
-                                       ]
-                               </xsl:for-each>
+                       <xsl:for-each select="datatable">
+                               datatable[<xsl:value-of select="name"/>] = [
+                               {
+                               values:<xsl:value-of select="values"/>,
+                               total_records: <xsl:value-of 
select="total_records"/>,
+                               is_paginator:  <xsl:value-of 
select="is_paginator"/>,
+                               permission:<xsl:value-of select="permission"/>,
+                               footer:<xsl:value-of select="footer"/>
+                               }
+                               ]
+                       </xsl:for-each>
 
-                               <xsl:for-each select="myColumnDefs">
-                                       myColumnDefs[<xsl:value-of 
select="name"/>] = <xsl:value-of select="values"/>
-                               </xsl:for-each>
-                               <xsl:for-each select="myButtons">
-                                       myButtons[<xsl:value-of 
select="name"/>] = <xsl:value-of select="values"/>
-                               </xsl:for-each>
-                       </script>
+                       <xsl:for-each select="myColumnDefs">
+                               myColumnDefs[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
+                       </xsl:for-each>
+                       <xsl:for-each select="myButtons">
+                               myButtons[<xsl:value-of select="name"/>] = 
<xsl:value-of select="values"/>
+                       </xsl:for-each>
+               </script>
                <xsl:value-of disable-output-escaping="yes" select="tabs"/>
                <!--div class="yui-content"-->
                <div id="general">
@@ -917,66 +950,66 @@
                                <div class="pure-control-group">
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_id"/>
+                                                       <xsl:value-of 
select="lang_id"/>
                                                </label>
-                                                                       
<xsl:value-of select="value_s_agreement_id"/>
+                                               <xsl:value-of 
select="value_s_agreement_id"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_name"/>
+                                                       <xsl:value-of 
select="lang_name"/>
                                                </label>
-                                                                       
<xsl:value-of select="value_name"/>
+                                               <xsl:value-of 
select="value_name"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_descr"/>
+                                                       <xsl:value-of 
select="lang_descr"/>
                                                </label>
-                                                                       
<textarea disabled="disabled" cols="60" rows="6" name="values[descr]" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_descr_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_descr"/>
-                                                                       
</textarea>
+                                               <textarea disabled="disabled" 
cols="60" rows="6" name="values[descr]">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_descr_statustext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_descr"/>
+                                               </textarea>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_category"/>
+                                                       <xsl:value-of 
select="lang_category"/>
                                                </label>
-                                                               <xsl:for-each 
select="cat_list">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="selected='selected'">
-                                                                               
        <td>
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
        </td>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </xsl:for-each>
+                                               <xsl:for-each select="cat_list">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="selected='1'">
+                                                                       <td>
+                                                                               
<xsl:value-of select="name"/>
+                                                                       </td>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </xsl:for-each>
                                        </div>
-                                                       <xsl:call-template 
name="vendor_view"/>
-                                                       <xsl:call-template 
name="b_account_view"/>
+                                       <xsl:call-template name="vendor_view"/>
+                                       <xsl:call-template 
name="b_account_view"/>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_start_date"/>
+                                                       <xsl:value-of 
select="lang_start_date"/>
                                                </label>
-                                                                       <input 
type="text" id="start_date" name="start_date" size="10" 
value="{value_start_date}" readonly="readonly" 
onMouseout="window.status='';return true;"/>
+                                               <input type="text" 
id="start_date" name="start_date" size="10" value="{value_start_date}" 
readonly="readonly"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_end_date"/>
+                                                       <xsl:value-of 
select="lang_end_date"/>
                                                </label>
-                                                                       <input 
type="text" id="end_date" name="end_date" size="10" value="{value_end_date}" 
readonly="readonly" onMouseout="window.status='';return true;"/>
+                                               <input type="text" 
id="end_date" name="end_date" size="10" value="{value_end_date}" 
readonly="readonly"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_termination_date"/>
+                                                       <xsl:value-of 
select="lang_termination_date"/>
                                                </label>
-                                                                       <input 
type="text" id="termination_date" name="termination_date" size="10" 
value="{value_termination_date}" readonly="readonly" 
onMouseout="window.status='';return true;"/>
+                                               <input type="text" 
id="termination_date" name="termination_date" size="10" 
value="{value_termination_date}" readonly="readonly"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
-                                                                       
<xsl:value-of select="lang_budget"/>
+                                                       <xsl:value-of 
select="lang_budget"/>
                                                </label>
                                                <!--div 
id="datatable-container_3"/-->
                                                <div class="pure-custom">
@@ -994,14 +1027,14 @@
                                                        </xsl:for-each>
                                                </div>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="files!=''">
-                                                                       <!-- 
<xsl:call-template name="file_list_view"/>-->
+                                       <xsl:choose>
+                                               <xsl:when test="files!=''">
+                                                       <!-- <xsl:call-template 
name="file_list_view"/>-->
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                               
        <xsl:value-of select="//lang_files"/>
+                                                                       
<xsl:value-of select="//lang_files"/>
                                                                </label>
-                                                                               
        <!-- DataTable 2 VIEW -->
+                                                               <!-- DataTable 
2 VIEW -->
                                                                <!--div 
id="datatable-container_2"/-->
                                                                <div 
class="pure-custom">
                                                                        
<xsl:for-each select="datatable_def">
@@ -1018,41 +1051,41 @@
                                                                        
</xsl:for-each>
                                                                </div>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="attributes_view != ''">
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="attributes_view 
!= ''">
                                                        <div 
class="pure-control-group">
                                                                                
             
-                                                                               
        <xsl:apply-templates select="attributes_view"/>
+                                                               
<xsl:apply-templates select="attributes_view"/>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="member_of_list != ''">
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="member_of_list 
!= ''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                               
        <xsl:value-of select="lang_member_of"/>
+                                                                       
<xsl:value-of select="lang_member_of"/>
                                                                </label>
-                                                                               
        <xsl:variable name="lang_member_of_statustext">
-                                                                               
                <xsl:value-of select="lang_member_of_statustext"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <select disabled="disabled" name="values[member_of][]" class="forms" 
multiple="multiple" onMouseover="window.status='{$lang_member_of_statustext}'; 
return true;" onMouseout="window.status='';return true;">
-                                                                               
                <xsl:apply-templates select="member_of_list"/>
-                                                                               
        </select>
+                                                               <xsl:variable 
name="lang_member_of_statustext">
+                                                                       
<xsl:value-of select="lang_member_of_statustext"/>
+                                                               </xsl:variable>
+                                                               <select 
disabled="disabled" name="values[member_of][]" class="forms" 
multiple="multiple" onMouseover="window.status='{$lang_member_of_statustext}'; 
return true;">
+                                                                       
<xsl:apply-templates select="member_of_list"/>
+                                                               </select>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                </div>
                                <fieldset  style="border: 1px solid ! 
important;">
                                        <div class="pure-control-group">
                                                             
                                                <div class="pure-control-group">
                                                        <label>
-                                                                       
<xsl:value-of select="lang_alarm"/>
+                                                               <xsl:value-of 
select="lang_alarm"/>
                                                        </label>
                                                </div>
-                                                       <!--  DataTable 0 VIEW 
-->
+                                               <!--  DataTable 0 VIEW -->
                                                <div class="pure-control-group">
                                                        <!--div 
id="datatable-container_0"/-->
                                                        <div 
class="pure-custom" style="display:inline" >
@@ -1070,7 +1103,7 @@
                                                                </xsl:for-each>
                                                        </div>
                                                </div>
-                                                       <!-- <xsl:call-template 
name="alarm_view"/> -->
+                                               <!-- <xsl:call-template 
name="alarm_view"/> -->
                                                             
                                        </div>
                                </fieldset>
@@ -1081,14 +1114,14 @@
                                <xsl:when test="values!=''">
                                        <div class="pure-control-group">
                                                <label>
-                                                               <xsl:value-of 
select="lang_total_records"/>
-                                                               <xsl:text> 
</xsl:text>
-                                                               <xsl:value-of 
select="total_records"/>
+                                                       <xsl:value-of 
select="lang_total_records"/>
+                                                       <xsl:text> </xsl:text>
+                                                       <xsl:value-of 
select="total_records"/>
                                                </label>
                                        </div>
-                                               <!--  DataTable 1 VIEW -->
+                                       <!--  DataTable 1 VIEW -->
                                        <div class="pure-control-group">
-                                                               <div 
id="paging_1"> </div>
+                                               <div id="paging_1"> </div>
                                                <!--div 
id="datatable-container_1"/-->
                                                <div class="pure-custom">
                                                        <xsl:for-each 
select="datatable_def">
@@ -1104,7 +1137,7 @@
                                                                </xsl:if>
                                                        </xsl:for-each>
                                                </div>
-                                                               <div 
id="contextmenu_1"/>
+                                               <div id="contextmenu_1"/>
                                        </div>
                                </xsl:when>
                        </xsl:choose>
@@ -1119,7 +1152,7 @@
                                                        <xsl:variable 
name="lang_cancel">
                                                                <xsl:value-of 
select="lang_cancel"/>
                                                        </xsl:variable>
-                                                       <input type="submit" 
name="values[cancel]" value="{$lang_cancel}" 
onMouseout="window.status='';return true;">
+                                                       <input type="submit" 
name="values[cancel]" value="{$lang_cancel}">
                                                                <xsl:attribute 
name="onMouseover">
                                                                        
<xsl:text>window.status='</xsl:text>
                                                                        
<xsl:value-of select="lang_cancel_statustext"/>
@@ -1143,7 +1176,7 @@
                                                <xsl:variable 
name="lang_cancel">
                                                        <xsl:value-of 
select="lang_cancel"/>
                                                </xsl:variable>
-                                               <input type="submit" 
class="pure-button pure-button-primary" name="values[cancel]" 
value="{$lang_cancel}" onMouseout="window.status='';return true;">
+                                               <input type="submit" 
class="pure-button pure-button-primary" name="values[cancel]" 
value="{$lang_cancel}">
                                                        <xsl:attribute 
name="onMouseover">
                                                                
<xsl:text>window.status='</xsl:text>
                                                                <xsl:value-of 
select="lang_cancel_statustext"/>
@@ -1153,8 +1186,8 @@
                                        </td>
                                </tr>
                        </form>
-                       </table>
-               </div>
+               </table>
+       </div>
 </xsl:template>
 
 <!-- view item -->
@@ -1171,13 +1204,13 @@
 
                                <xsl:for-each select="datatable">
                                        datatable[<xsl:value-of 
select="name"/>] = [
-                                               {
-                                                       values:<xsl:value-of 
select="values"/>,
-                                                       total_records: 
<xsl:value-of select="total_records"/>,
-                                                       is_paginator:  
<xsl:value-of select="is_paginator"/>,
-                                                       
permission:<xsl:value-of select="permission"/>,
-                                                       footer:<xsl:value-of 
select="footer"/>
-                                               }
+                                       {
+                                       values:<xsl:value-of select="values"/>,
+                                       total_records: <xsl:value-of 
select="total_records"/>,
+                                       is_paginator:  <xsl:value-of 
select="is_paginator"/>,
+                                       permission:<xsl:value-of 
select="permission"/>,
+                                       footer:<xsl:value-of select="footer"/>
+                                       }
                                        ]
                                </xsl:for-each>
 
@@ -1192,7 +1225,7 @@
                                <xsl:choose>
                                        <xsl:when test="msgbox_data != ''">
                                                <dt>
-                                                               
<xsl:call-template name="msgbox"/>
+                                                       <xsl:call-template 
name="msgbox"/>
                                                </dt>
                                        </xsl:when>
                                </xsl:choose>
@@ -1204,10 +1237,10 @@
                                                        <label>
                                                                <xsl:value-of 
select="lang_agreement"/>
                                                        </label>
-                                                               <xsl:value-of 
select="value_s_agreement_id"/>
-                                                               <xsl:text> 
[</xsl:text>
-                                                               <xsl:value-of 
select="agreement_name"/>
-                                                               <xsl:text>] 
</xsl:text>
+                                                       <xsl:value-of 
select="value_s_agreement_id"/>
+                                                       <xsl:text> [</xsl:text>
+                                                       <xsl:value-of 
select="agreement_name"/>
+                                                       <xsl:text>] </xsl:text>
                                                </div>
                                        </xsl:when>
                                </xsl:choose>
@@ -1217,7 +1250,7 @@
                                                        <label>
                                                                <xsl:value-of 
select="lang_id"/>
                                                        </label>
-                                                               <xsl:value-of 
select="value_id"/>
+                                                       <xsl:value-of 
select="value_id"/>
                                                </div>
                                        </xsl:when>
                                </xsl:choose>
@@ -1226,13 +1259,13 @@
                                        <label>
                                                <xsl:value-of 
select="lang_cost"/>
                                        </label>
-                                               <xsl:value-of 
select="value_cost"/>
+                                       <xsl:value-of select="value_cost"/>
                                </div>
                                <xsl:choose>
                                        <xsl:when test="attributes_view != ''">
                                                <div clas="pure-control-group">
                                                        <br></br>
-                                                               
<xsl:apply-templates select="attributes_view"/>
+                                                       <xsl:apply-templates 
select="attributes_view"/>
                                                                 
                                                </div>
                                        </xsl:when>
@@ -1261,7 +1294,7 @@
                                                                        
</xsl:if>
                                                                </xsl:for-each>
                                                        </div>
-                                                               <div 
id="contextmenu_0"/>
+                                                       <div 
id="contextmenu_0"/>
                                                </div>
                                                <!--
                                                <xsl:call-template 
name="table_header"/>
@@ -1275,16 +1308,16 @@
                        </xsl:variable>
                        <form name="form" method="post" class="pure-form 
pure-form-aligned" action="{$edit_url}">
                                <div class="pure-control-group">
-                                                       <xsl:variable 
name="lang_cancel">
-                                                               <xsl:value-of 
select="lang_cancel"/>
-                                                       </xsl:variable>
-                                       <input type="submit" class="pure-button 
pure-button-primary" name="cancel" value="{$lang_cancel}" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="onMouseover">
-                                                                       
<xsl:text>window.status='</xsl:text>
-                                                                       
<xsl:value-of select="lang_cancel_statustext"/>
-                                                                       
<xsl:text>'; return true;</xsl:text>
-                                                               </xsl:attribute>
-                                                       </input>
+                                       <xsl:variable name="lang_cancel">
+                                               <xsl:value-of 
select="lang_cancel"/>
+                                       </xsl:variable>
+                                       <input type="submit" class="pure-button 
pure-button-primary" name="cancel" value="{$lang_cancel}">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_cancel_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
                                </div>
                        </form>
                </div>
@@ -1293,534 +1326,543 @@
 
 <!-- New template-->
 <xsl:template match="table_add2">
+       <tr>
+               <td height="50">
+                       <xsl:variable name="add_action">
+                               <xsl:value-of select="add_action"/>
+                       </xsl:variable>
+                       <xsl:variable name="lang_add">
+                               <xsl:value-of select="lang_add"/>
+                       </xsl:variable>
+                       <form method="post" action="{$add_action}">
+                               <input type="submit" name="add" 
value="{$lang_add}">
+                                       <xsl:attribute name="onMouseover">
+                                               
<xsl:text>window.status='</xsl:text>
+                                               <xsl:value-of 
select="lang_add_standardtext"/>
+                                               <xsl:text>'; return 
true;</xsl:text>
+                                       </xsl:attribute>
+                               </input>
+                       </form>
+               </td>
+               <td height="50">
+                       <xsl:variable name="done_action">
+                               <xsl:value-of select="done_action"/>
+                       </xsl:variable>
+                       <xsl:variable name="lang_done">
+                               <xsl:value-of select="lang_done"/>
+                       </xsl:variable>
+                       <form method="post" action="{$done_action}">
+                               <input type="submit" name="add" 
value="{$lang_done}">
+                                       <xsl:attribute name="onMouseover">
+                                               
<xsl:text>window.status='</xsl:text>
+                                               <xsl:value-of 
select="lang_add_standardtext"/>
+                                               <xsl:text>'; return 
true;</xsl:text>
+                                       </xsl:attribute>
+                               </input>
+                       </form>
+               </td>
+       </tr>
+</xsl:template>
+
+<!-- list attribute -->
+<xsl:template match="list_attribute">
+       <table width="100%" cellpadding="2" cellspacing="2" align="center">
                <tr>
-                       <td height="50">
-                               <xsl:variable name="add_action">
-                                       <xsl:value-of select="add_action"/>
-                               </xsl:variable>
-                               <xsl:variable name="lang_add">
-                                       <xsl:value-of select="lang_add"/>
-                               </xsl:variable>
-                               <form method="post" action="{$add_action}">
-                                       <input type="submit" name="add" 
value="{$lang_add}" onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                       <xsl:value-of 
select="lang_add_standardtext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                       </input>
-                               </form>
+                       <td align="right">
+                               <xsl:call-template name="search_field"/>
                        </td>
-                       <td height="50">
-                               <xsl:variable name="done_action">
-                                       <xsl:value-of select="done_action"/>
-                               </xsl:variable>
-                               <xsl:variable name="lang_done">
-                                       <xsl:value-of select="lang_done"/>
-                               </xsl:variable>
-                               <form method="post" action="{$done_action}">
-                                       <input type="submit" name="add" 
value="{$lang_done}" onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                       <xsl:value-of 
select="lang_add_standardtext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                       </input>
-                               </form>
+               </tr>
+               <tr>
+                       <td colspan="3" width="100%">
+                               <xsl:call-template name="nextmatchs"/>
                        </td>
                </tr>
+       </table>
+       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+               <xsl:apply-templates select="table_header_attrib"/>
+               <xsl:apply-templates select="values_attrib"/>
+               <xsl:apply-templates select="table_add2"/>
+       </table>
 </xsl:template>
 
-<!-- list attribute -->
-<xsl:template match="list_attribute">
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr>
-                               <td align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="3" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header_attrib"/>
-                       <xsl:apply-templates select="values_attrib"/>
-                       <xsl:apply-templates select="table_add2"/>
-               </table>
-</xsl:template>
-
 <!-- New template-->
 <xsl:template match="table_header_attrib">
-               <xsl:variable name="sort_sorting">
-                       <xsl:value-of select="sort_sorting"/>
-               </xsl:variable>
-               <xsl:variable name="sort_id">
-                       <xsl:value-of select="sort_id"/>
-               </xsl:variable>
-               <xsl:variable name="sort_name">
-                       <xsl:value-of select="sort_name"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="10%" align="left">
-                               <a href="{$sort_name}">
-                                       <xsl:value-of select="lang_name"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="10%" align="left">
-                               <xsl:value-of select="lang_descr"/>
-                       </td>
-                       <td class="th_text" width="1%" align="center">
-                               <xsl:value-of select="lang_datatype"/>
-                       </td>
-                       <td class="th_text" width="5%" align="center">
-                               <a href="{$sort_sorting}">
-                                       <xsl:value-of select="lang_sorting"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="1%" align="center">
-                               <xsl:value-of select="lang_search"/>
-                       </td>
-                       <td class="th_text" width="5%" align="center">
-                               <xsl:value-of select="lang_edit"/>
-                       </td>
-                       <td class="th_text" width="5%" align="center">
-                               <xsl:value-of select="lang_delete"/>
-                       </td>
-               </tr>
+       <xsl:variable name="sort_sorting">
+               <xsl:value-of select="sort_sorting"/>
+       </xsl:variable>
+       <xsl:variable name="sort_id">
+               <xsl:value-of select="sort_id"/>
+       </xsl:variable>
+       <xsl:variable name="sort_name">
+               <xsl:value-of select="sort_name"/>
+       </xsl:variable>
+       <tr class="th">
+               <td class="th_text" width="10%" align="left">
+                       <a href="{$sort_name}">
+                               <xsl:value-of select="lang_name"/>
+                       </a>
+               </td>
+               <td class="th_text" width="10%" align="left">
+                       <xsl:value-of select="lang_descr"/>
+               </td>
+               <td class="th_text" width="1%" align="center">
+                       <xsl:value-of select="lang_datatype"/>
+               </td>
+               <td class="th_text" width="5%" align="center">
+                       <a href="{$sort_sorting}">
+                               <xsl:value-of select="lang_sorting"/>
+                       </a>
+               </td>
+               <td class="th_text" width="1%" align="center">
+                       <xsl:value-of select="lang_search"/>
+               </td>
+               <td class="th_text" width="5%" align="center">
+                       <xsl:value-of select="lang_edit"/>
+               </td>
+               <td class="th_text" width="5%" align="center">
+                       <xsl:value-of select="lang_delete"/>
+               </td>
+       </tr>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="values_attrib">
-               <xsl:variable name="lang_up_text">
-                       <xsl:value-of select="lang_up_text"/>
-               </xsl:variable>
-               <xsl:variable name="lang_down_text">
-                       <xsl:value-of select="lang_down_text"/>
-               </xsl:variable>
-               <xsl:variable name="lang_attribute_attribtext">
-                       <xsl:value-of select="lang_delete_attribtext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_edit_attribtext">
-                       <xsl:value-of select="lang_edit_attribtext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_delete_attribtext">
-                       <xsl:value-of select="lang_delete_attribtext"/>
-               </xsl:variable>
-               <tr>
-                       <xsl:attribute name="class">
-                               <xsl:choose>
-                                       <xsl:when test="@class">
-                                               <xsl:value-of select="@class"/>
-                                       </xsl:when>
-                                       <xsl:when test="position() mod 2 = 0">
-                                               <xsl:text>row_off</xsl:text>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:text>row_on</xsl:text>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </xsl:attribute>
-                       <td align="left">
-                               <xsl:value-of select="column_name"/>
-                       </td>
-                       <td align="left">
-                               <xsl:value-of select="input_text"/>
-                       </td>
-                       <td align="left">
-                               <xsl:value-of select="datatype"/>
-                       </td>
-                       <td>
-                               <table align="left">
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="sorting"/>
-                                               </td>
-                                               <td align="left">
-                                                       <xsl:variable 
name="link_up">
-                                                               <xsl:value-of 
select="link_up"/>
-                                                       </xsl:variable>
-                                                       <a href="{$link_up}" 
onMouseover="window.status='{$lang_up_text}';return true;" 
onMouseout="window.status='';return true;">
-                                                               <xsl:value-of 
select="text_up"/>
-                                                       </a>
-                                                       <xsl:text> | </xsl:text>
-                                                       <xsl:variable 
name="link_down">
-                                                               <xsl:value-of 
select="link_down"/>
-                                                       </xsl:variable>
-                                                       <a href="{$link_down}" 
onMouseover="window.status='{$lang_down_text}';return true;" 
onMouseout="window.status='';return true;">
-                                                               <xsl:value-of 
select="text_down"/>
-                                                       </a>
-                                               </td>
-                                       </tr>
-                               </table>
-                       </td>
-                       <td align="center">
-                               <xsl:value-of select="search"/>
-                       </td>
-                       <td align="center">
-                               <xsl:variable name="link_edit">
-                                       <xsl:value-of select="link_edit"/>
-                               </xsl:variable>
-                               <a href="{$link_edit}" 
onMouseover="window.status='{$lang_edit_attribtext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="text_edit"/>
-                               </a>
-                       </td>
-                       <td align="center">
-                               <xsl:variable name="link_delete">
-                                       <xsl:value-of select="link_delete"/>
-                               </xsl:variable>
-                               <a href="{$link_delete}" 
title="$lang_delete_attribtext">
-                                       <xsl:value-of select="text_delete"/>
-                               </a>
-                       </td>
-               </tr>
+       <xsl:variable name="lang_up_text">
+               <xsl:value-of select="lang_up_text"/>
+       </xsl:variable>
+       <xsl:variable name="lang_down_text">
+               <xsl:value-of select="lang_down_text"/>
+       </xsl:variable>
+       <xsl:variable name="lang_attribute_attribtext">
+               <xsl:value-of select="lang_delete_attribtext"/>
+       </xsl:variable>
+       <xsl:variable name="lang_edit_attribtext">
+               <xsl:value-of select="lang_edit_attribtext"/>
+       </xsl:variable>
+       <xsl:variable name="lang_delete_attribtext">
+               <xsl:value-of select="lang_delete_attribtext"/>
+       </xsl:variable>
+       <tr>
+               <xsl:attribute name="class">
+                       <xsl:choose>
+                               <xsl:when test="@class">
+                                       <xsl:value-of select="@class"/>
+                               </xsl:when>
+                               <xsl:when test="position() mod 2 = 0">
+                                       <xsl:text>row_off</xsl:text>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:text>row_on</xsl:text>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </xsl:attribute>
+               <td align="left">
+                       <xsl:value-of select="column_name"/>
+               </td>
+               <td align="left">
+                       <xsl:value-of select="input_text"/>
+               </td>
+               <td align="left">
+                       <xsl:value-of select="datatype"/>
+               </td>
+               <td>
+                       <table align="left">
+                               <tr>
+                                       <td>
+                                               <xsl:value-of select="sorting"/>
+                                       </td>
+                                       <td align="left">
+                                               <xsl:variable name="link_up">
+                                                       <xsl:value-of 
select="link_up"/>
+                                               </xsl:variable>
+                                               <a href="{$link_up}" 
onMouseover="window.status='{$lang_up_text}';return true;">
+                                                       <xsl:value-of 
select="text_up"/>
+                                               </a>
+                                               <xsl:text> | </xsl:text>
+                                               <xsl:variable name="link_down">
+                                                       <xsl:value-of 
select="link_down"/>
+                                               </xsl:variable>
+                                               <a href="{$link_down}" 
onMouseover="window.status='{$lang_down_text}';return true;">
+                                                       <xsl:value-of 
select="text_down"/>
+                                               </a>
+                                       </td>
+                               </tr>
+                       </table>
+               </td>
+               <td align="center">
+                       <xsl:value-of select="search"/>
+               </td>
+               <td align="center">
+                       <xsl:variable name="link_edit">
+                               <xsl:value-of select="link_edit"/>
+                       </xsl:variable>
+                       <a href="{$link_edit}" 
onMouseover="window.status='{$lang_edit_attribtext}';return true;">
+                               <xsl:value-of select="text_edit"/>
+                       </a>
+               </td>
+               <td align="center">
+                       <xsl:variable name="link_delete">
+                               <xsl:value-of select="link_delete"/>
+                       </xsl:variable>
+                       <a href="{$link_delete}" 
title="$lang_delete_attribtext">
+                               <xsl:value-of select="text_delete"/>
+                       </a>
+               </td>
+       </tr>
 </xsl:template>
 
 <!-- add attribute / edit attribute -->
 <xsl:template match="edit_attrib">
-               <div align="left">
-                       <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
+       <div align="left">
+               <table cellpadding="2" cellspacing="2" width="80%" 
align="center">
+                       <xsl:choose>
+                               <xsl:when test="msgbox_data != ''">
+                                       <tr>
+                                               <td align="left" colspan="3">
+                                                       <xsl:call-template 
name="msgbox"/>
+                                               </td>
+                                       </tr>
+                               </xsl:when>
+                       </xsl:choose>
+                       <xsl:variable name="form_action">
+                               <xsl:value-of select="form_action"/>
+                       </xsl:variable>
+                       <form method="post" action="{$form_action}">
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_id != ''">
+                                                               <xsl:value-of 
select="lang_id"/>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </td>
+                                       <td>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_id != ''">
+                                                               <xsl:value-of 
select="value_id"/>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_column_name"/>
+                                       </td>
+                                       <td>
+                                               <input type="text" 
name="values[column_name]" value="{value_column_name}" maxlength="20">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_column_name_statustext"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_input_text"/>
+                                       </td>
+                                       <td>
+                                               <input type="text" 
name="values[input_text]" value="{value_input_text}" size="60" maxlength="50">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_input_text_statustext"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_statustext"/>
+                                       </td>
+                                       <td>
+                                               <textarea cols="60" rows="10" 
name="values[statustext]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_statustext_attribtext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_statustext"/>
+                                               </textarea>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_datatype"/>
+                                       </td>
+                                       <td valign="top">
+                                               <xsl:variable 
name="lang_datatype_statustext">
+                                                       <xsl:value-of 
select="lang_datatype_statustext"/>
+                                               </xsl:variable>
+                                               <select 
name="values[column_info][type]" class="forms" 
onMouseover="window.status='{$lang_datatype_statustext}'; return true;">
+                                                       <option value="">
+                                                               <xsl:value-of 
select="lang_no_datatype"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="datatype_list"/>
+                                               </select>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_precision"/>
+                                       </td>
+                                       <td>
+                                               <input type="text" 
name="values[column_info][precision]" value="{value_precision}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_precision_statustext"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_scale"/>
+                                       </td>
+                                       <td>
+                                               <input type="text" 
name="values[column_info][scale]" value="{value_scale}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_scale_statustext"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_default"/>
+                                       </td>
+                                       <td>
+                                               <input type="text" 
name="values[column_info][default]" value="{value_default}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_default_statustext"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td valign="top">
+                                               <xsl:value-of 
select="lang_nullable"/>
+                                       </td>
+                                       <td valign="top">
+                                               <xsl:variable 
name="lang_nullable_statustext">
+                                                       <xsl:value-of 
select="lang_nullable_statustext"/>
+                                               </xsl:variable>
+                                               <select 
name="values[column_info][nullable]" class="forms" 
onMouseover="window.status='{$lang_nullable_statustext}'; return true;">
+                                                       <option value="">
+                                                               <xsl:value-of 
select="lang_select_nullable"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="nullable_list"/>
+                                               </select>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>
+                                               <xsl:value-of 
select="lang_list"/>
+                                       </td>
+                                       <td>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_list = 1">
+                                                               <input 
type="checkbox" name="values[list]" value="1" checked="checked">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_list_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <input 
type="checkbox" name="values[list]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_list_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>
+                                               <xsl:value-of 
select="lang_include_search"/>
+                                       </td>
+                                       <td>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_search = 1">
+                                                               <input 
type="checkbox" name="values[search]" value="1" checked="checked">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_include_search_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <input 
type="checkbox" name="values[search]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_include_search_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>
+                                               <xsl:value-of 
select="lang_history"/>
+                                       </td>
+                                       <td>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_history = 1">
+                                                               <input 
type="checkbox" name="values[history]" value="1" checked="checked">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_history_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <input 
type="checkbox" name="values[history]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_history_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </td>
+                               </tr>
                                <xsl:choose>
-                                       <xsl:when test="msgbox_data != ''">
+                                       <xsl:when test="multiple_choice != ''">
                                                <tr>
-                                                       <td align="left" 
colspan="3">
-                                                               
<xsl:call-template name="msgbox"/>
+                                                       <td valign="top">
+                                                               <xsl:value-of 
select="lang_choice"/>
                                                        </td>
+                                                       <td align="right">
+                                                               
<xsl:call-template name="choice"/>
+                                                       </td>
                                                </tr>
                                        </xsl:when>
                                </xsl:choose>
-                               <xsl:variable name="form_action">
-                                       <xsl:value-of select="form_action"/>
-                               </xsl:variable>
-                               <form method="post" action="{$form_action}">
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_id != ''">
-                                                                       
<xsl:value-of select="lang_id"/>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </td>
-                                               <td>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_id != ''">
-                                                                       
<xsl:value-of select="value_id"/>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_column_name"/>
-                                               </td>
-                                               <td>
-                                                       <input type="text" 
name="values[column_name]" value="{value_column_name}" maxlength="20" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_column_name_statustext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_input_text"/>
-                                               </td>
-                                               <td>
-                                                       <input type="text" 
name="values[input_text]" value="{value_input_text}" size="60" maxlength="50" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_input_text_statustext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_statustext"/>
-                                               </td>
-                                               <td>
-                                                       <textarea cols="60" 
rows="10" name="values[statustext]" onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_statustext_attribtext"/>
-                                                               </xsl:attribute>
-                                                               <xsl:value-of 
select="value_statustext"/>
-                                                       </textarea>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_datatype"/>
-                                               </td>
-                                               <td valign="top">
-                                                       <xsl:variable 
name="lang_datatype_statustext">
-                                                               <xsl:value-of 
select="lang_datatype_statustext"/>
-                                                       </xsl:variable>
-                                                       <select 
name="values[column_info][type]" class="forms" 
onMouseover="window.status='{$lang_datatype_statustext}'; return true;" 
onMouseout="window.status='';return true;">
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="lang_no_datatype"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="datatype_list"/>
-                                                       </select>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_precision"/>
-                                               </td>
-                                               <td>
-                                                       <input type="text" 
name="values[column_info][precision]" value="{value_precision}" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_precision_statustext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_scale"/>
-                                               </td>
-                                               <td>
-                                                       <input type="text" 
name="values[column_info][scale]" value="{value_scale}" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_scale_statustext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_default"/>
-                                               </td>
-                                               <td>
-                                                       <input type="text" 
name="values[column_info][default]" value="{value_default}" 
onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_default_statustext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td valign="top">
-                                                       <xsl:value-of 
select="lang_nullable"/>
-                                               </td>
-                                               <td valign="top">
-                                                       <xsl:variable 
name="lang_nullable_statustext">
-                                                               <xsl:value-of 
select="lang_nullable_statustext"/>
-                                                       </xsl:variable>
-                                                       <select 
name="values[column_info][nullable]" class="forms" 
onMouseover="window.status='{$lang_nullable_statustext}'; return true;" 
onMouseout="window.status='';return true;">
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="lang_select_nullable"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="nullable_list"/>
-                                                       </select>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="lang_list"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_list = 1">
-                                                                       <input 
type="checkbox" name="values[list]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_list_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       <input 
type="checkbox" name="values[list]" value="1" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_list_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="lang_include_search"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_search = 1">
-                                                                       <input 
type="checkbox" name="values[search]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_include_search_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       <input 
type="checkbox" name="values[search]" value="1" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_include_search_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </td>
-                                       </tr>
-                                       <tr>
-                                               <td>
-                                                       <xsl:value-of 
select="lang_history"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_history = 1">
-                                                                       <input 
type="checkbox" name="values[history]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_history_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       <input 
type="checkbox" name="values[history]" value="1" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_history_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </td>
-                                       </tr>
-                                       <xsl:choose>
-                                               <xsl:when test="multiple_choice 
!= ''">
-                                                       <tr>
-                                                               <td 
valign="top">
-                                                                       
<xsl:value-of select="lang_choice"/>
-                                                               </td>
-                                                               <td 
align="right">
-                                                                       
<xsl:call-template name="choice"/>
-                                                               </td>
-                                                       </tr>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <tr height="50">
-                                               <td>
-                                                       <xsl:variable 
name="lang_save">
-                                                               <xsl:value-of 
select="lang_save"/>
-                                                       </xsl:variable>
-                                                       <input type="submit" 
name="values[save]" value="{$lang_save}" onMouseout="window.status='';return 
true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_save_attribtext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </td>
-                                       </tr>
-                               </form>
-                               <tr>
+                               <tr height="50">
                                        <td>
-                                               <xsl:variable 
name="done_action">
-                                                       <xsl:value-of 
select="done_action"/>
+                                               <xsl:variable name="lang_save">
+                                                       <xsl:value-of 
select="lang_save"/>
                                                </xsl:variable>
-                                               <xsl:variable name="lang_done">
-                                                       <xsl:value-of 
select="lang_done"/>
-                                               </xsl:variable>
-                                               <form method="post" 
action="{$done_action}">
-                                                       <input type="submit" 
name="done" value="{$lang_done}" onMouseout="window.status='';return true;">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="lang_done_attribtext"/>
-                                                               </xsl:attribute>
-                                                       </input>
-                                               </form>
+                                               <input type="submit" 
name="values[save]" value="{$lang_save}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_save_attribtext"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </td>
                                </tr>
-                       </table>
-               </div>
+                       </form>
+                       <tr>
+                               <td>
+                                       <xsl:variable name="done_action">
+                                               <xsl:value-of 
select="done_action"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="lang_done">
+                                               <xsl:value-of 
select="lang_done"/>
+                                       </xsl:variable>
+                                       <form method="post" 
action="{$done_action}">
+                                               <input type="submit" 
name="done" value="{$lang_done}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_done_attribtext"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </form>
+                               </td>
+                       </tr>
+               </table>
+       </div>
 </xsl:template>
 
 <!-- New template-->
 <!-- datatype_list -->
 <xsl:template match="datatype_list">
-               <xsl:variable name="id">
-                       <xsl:value-of select="id"/>
-               </xsl:variable>
-               <xsl:choose>
-                       <xsl:when test="selected">
-                               <option value="{$id}" selected="selected">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <option value="{$id}">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:otherwise>
-               </xsl:choose>
+       <xsl:variable name="id">
+               <xsl:value-of select="id"/>
+       </xsl:variable>
+       <xsl:choose>
+               <xsl:when test="selected">
+                       <option value="{$id}" selected="selected">
+                               <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       </option>
+               </xsl:when>
+               <xsl:otherwise>
+                       <option value="{$id}">
+                               <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       </option>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>
 
 <!-- New template-->
 <!-- nullable_list -->
 <xsl:template match="nullable_list">
-               <xsl:variable name="id">
-                       <xsl:value-of select="id"/>
-               </xsl:variable>
-               <xsl:choose>
-                       <xsl:when test="selected">
-                               <option value="{$id}" selected="selected">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <option value="{$id}">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:otherwise>
-               </xsl:choose>
+       <xsl:variable name="id">
+               <xsl:value-of select="id"/>
+       </xsl:variable>
+       <xsl:choose>
+               <xsl:when test="selected">
+                       <option value="{$id}" selected="selected">
+                               <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       </option>
+               </xsl:when>
+               <xsl:otherwise>
+                       <option value="{$id}">
+                               <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       </option>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="member_of_list">
-               <xsl:variable name="id">
-                       <xsl:value-of select="cat_id"/>
-               </xsl:variable>
-               <xsl:choose>
-                       <xsl:when test="selected='selected'">
-                               <option value="{$id}" selected="selected">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <option value="{$id}">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                               </option>
-                       </xsl:otherwise>
-               </xsl:choose>
+       <xsl:variable name="id">
+               <xsl:value-of select="cat_id"/>
+       </xsl:variable>
+       <xsl:choose>
+               <xsl:when test="selected='selected'">
+                       <option value="{$id}" selected="selected">
+                               <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       </option>
+               </xsl:when>
+               <xsl:otherwise>
+                       <option value="{$id}">
+                               <xsl:value-of disable-output-escaping="yes" 
select="name"/>
+                       </option>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="year">
-               <xsl:variable name="id">
-                       <xsl:value-of select="id"/>
-               </xsl:variable>
-               <xsl:choose>
-                       <xsl:when test="selected='selected'">
-                               <option value="{$id}" selected="selected">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="id"/>
-                               </option>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <option value="{$id}">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="id"/>
-                               </option>
-                       </xsl:otherwise>
-               </xsl:choose>
+       <xsl:variable name="id">
+               <xsl:value-of select="id"/>
+       </xsl:variable>
+       <xsl:choose>
+               <xsl:when test="selected='selected'">
+                       <option value="{$id}" selected="selected">
+                               <xsl:value-of disable-output-escaping="yes" 
select="id"/>
+                       </option>
+               </xsl:when>
+               <xsl:otherwise>
+                       <option value="{$id}">
+                               <xsl:value-of disable-output-escaping="yes" 
select="id"/>
+                       </option>
+               </xsl:otherwise>
+       </xsl:choose>
 </xsl:template>
 <!-- New template-->
 
 <xsl:template match="member_of_list2">
-                       <input type="checkbox" name="values[member_of][]" 
value="{cat_id}">
-                               <xsl:if test="selected != ''">
-                                       <xsl:attribute name="checked" 
value="checked"/>
-                               </xsl:if>
-                       </input>
-                       <xsl:value-of disable-output-escaping="yes" 
select="name"/>
-               <br/>
+       <input type="checkbox" name="values[member_of][]" value="{cat_id}">
+               <xsl:if test="selected != ''">
+                       <xsl:attribute name="checked" value="checked"/>
+               </xsl:if>
+       </input>
+       <xsl:value-of disable-output-escaping="yes" select="name"/>
+       <br/>
 </xsl:template>
-        
+
+<!-- New template-->
+<xsl:template match="options">
+       <option value="{id}">
+               <xsl:if test="selected != 0">
+                       <xsl:attribute name="selected" value="selected"/>
+               </xsl:if>
+               <xsl:value-of disable-output-escaping="yes" select="name"/>
+       </option>
+</xsl:template>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]