fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14814] Merge 14809:14813 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [14814] Merge 14809:14813 from trunk
Date: Mon, 07 Mar 2016 14:42:34 +0000

Revision: 14814
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14814
Author:   sigurdne
Date:     2016-03-07 14:42:34 +0000 (Mon, 07 Mar 2016)
Log Message:
-----------
Merge 14809:14813 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php
    branches/Version-2_0-branch/property/inc/class.bocommon.inc.php
    branches/Version-2_0-branch/property/inc/class.solocation.inc.php
    branches/Version-2_0-branch/property/inc/class.sorequest.inc.php
    branches/Version-2_0-branch/property/inc/class.uientity.inc.php
    branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
    branches/Version-2_0-branch/property/inc/class.uirequest.inc.php
    branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
    branches/Version-2_0-branch/property/js/portico/workorder.edit.js
    branches/Version-2_0-branch/property/setup/phpgw_no.lang
    branches/Version-2_0-branch/property/templates/base/generic.xsl
    branches/Version-2_0-branch/property/templates/base/project.xsl
    branches/Version-2_0-branch/property/templates/base/workorder.xsl

Property Changed:
----------------
    branches/Version-2_0-branch/


Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14808
   + /branches/dev-syncromind:13653
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813

Modified: branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php
===================================================================
--- branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php       
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/controller/inc/class.socheck_list.inc.php       
2016-03-07 14:42:34 UTC (rev 14814)
@@ -497,12 +497,23 @@
 
                        $this->db->query($sql);
                        $this->db->next_record();
-                       
-                       return array(
-                               'start_timestamp' => 
$this->db->f('start_timestamp'),
-                               'end_timestamp' => 
$this->db->f('end_timestamp'),
-                       );
+                       $start_timestamp = $this->db->f('start_timestamp');
+                       $end_timestamp = $this->db->f('end_timestamp');
 
+                       if($start_timestamp)
+                       {
+                               return array(
+                                       'start_timestamp' => $start_timestamp,
+                                       'end_timestamp' => $end_timestamp
+                               );
+                       }
+                       else
+                       {
+                               return array(
+                                       'start_timestamp' => time(),
+                                       'end_timestamp' => time()
+                               );
+                       }
                }
 
                /**

Modified: branches/Version-2_0-branch/property/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bocommon.inc.php     
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.bocommon.inc.php     
2016-03-07 14:42:34 UTC (rev 14814)
@@ -1245,7 +1245,7 @@
                                        $uicols['datatype'][] = '';
                                        $uicols['formatter'][] = '';
                                        $uicols['classname'][] = '';
-                                       $uicols['sortable'][] = $_level === 1;
+                                       $uicols['sortable'][] = $_level == 1;
                                }
                        }
 

Modified: branches/Version-2_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.solocation.inc.php   
2016-03-07 14:42:34 UTC (rev 14814)
@@ -153,7 +153,7 @@
                                $entity['related'][] = array
                                        (
                                        'entity_link' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uirequest.index',
-                                               'query' => $location_code)),
+                                               'query' => $location_code, 
'status_id' => 'all')),
                                        'name' => lang('request') . " 
[{$hits}]",
                                        'descr' => lang('request')
                                );

Modified: branches/Version-2_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sorequest.inc.php    
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.sorequest.inc.php    
2016-03-07 14:42:34 UTC (rev 14814)
@@ -330,6 +330,7 @@
 
                        $uicols = array();
                        $cols .= "{$entity_table}.location_code";
+                       $cols .= ",{$entity_table}.loc1";
                        $cols_return[] = 'location_code';
                        $cols_group[] = "{$entity_table}.location_code";
                        $cols_group[] = 'fm_location1.loc1_name';
@@ -478,8 +479,7 @@
                        $uicols['classname'][] = 'rightClasss';
                        $uicols['sortable'][] = true;
 
-//                     $cols.= ",sum(amount) as consume";
-//                     $cols_return[]                          = 'consume';
+/*
                        $uicols['input_type'][] = 'text';
                        $uicols['name'][] = 'consume';
                        $uicols['descr'][] = lang('consume');
@@ -490,8 +490,8 @@
                        $uicols['formatter'][] = 'FormatterRight';
                        $uicols['classname'][] = '';
                        $uicols['sortable'][] = true;
+*/
 
-
                        $cols.= ",$entity_table.score";
                        $cols_return[] = 'score';
                        $cols_group[] = 'score';
@@ -579,9 +579,9 @@
                        $paranthesis .= '(';
                        $joinmethod .= "{$this->_left_join} fm_request_planning 
ON {$entity_table}.id = fm_request_planning.request_id)";
 
+//                     $paranthesis .= '(';
+//                     $joinmethod .= "{$this->_left_join} fm_request_consume 
ON {$entity_table}.id = fm_request_consume.request_id)";
                        $paranthesis .= '(';
-                       $joinmethod .= "{$this->_left_join} fm_request_consume 
ON {$entity_table}.id = fm_request_consume.request_id)";
-                       $paranthesis .= '(';
                        $joinmethod .= "{$this->_left_join} 
fm_request_condition ON {$entity_table}.id = fm_request_condition.request_id)";
 
                        $_location_level = 
isset($GLOBALS['phpgw']->config->config_data['request_location_level']) && 
$GLOBALS['phpgw']->config->config_data['request_location_level'] ? 
$GLOBALS['phpgw']->config->config_data['request_location_level'] : 0;
@@ -610,6 +610,9 @@
                                        case 'planned_year':
                                                $ordermethod = " ORDER BY 
planned_year $sort";
                                                break;
+                                       case 'loc1':
+                                               $ordermethod = " ORDER BY 
fm_request.loc1 $sort";
+                                               break;
                                        case 'loc1_name':
                                                $ordermethod = " ORDER BY 
fm_location1.loc1_name $sort";
                                                break;
@@ -739,8 +742,12 @@
                                }
                                else
                                {
+                                       if(ctype_digit($query))
+                                       {
+                                               $_filter_id = "OR fm_request.id 
=" . (int)$query;
+                                       }
                                        $query = 
$this->_db->db_addslashes($query);
-                                       $querymethod = " $where 
(fm_request.title {$this->_like} '%$query%' OR fm_request.address 
{$this->_like} '%$query%' OR fm_request.location_code {$this->_like} '%$query%' 
OR fm_request.id =" . (int)$query;
+                                       $querymethod = " $where 
(fm_request.title {$this->_like} '%$query%' OR fm_request.address 
{$this->_like} '%$query%' OR fm_request.location_code {$this->_like} '%$query%' 
{$_filter_id}";
                                        for ($i = 1; $i <= ($_location_level); 
$i++)
                                        {
                                                $querymethod .= " OR 
fm_location{$i}.loc{$i}_name {$this->_like} '%$query%'";
@@ -791,12 +798,12 @@
                        $this->sum_investment = $this->_db->f('sum_investment');
                        $this->sum_operation = $this->_db->f('sum_operation');
                        $this->sum_potential_grants = 
$this->_db->f('sum_potential_grants');
-
+/*
                        $sql3 = "SELECT sum(fm_request_consume.amount) as 
sum_consume  FROM {$sql_arr[1]}";
                        $this->_db->query($sql3, __LINE__, __FILE__);
                        $this->_db->next_record();
                        $this->sum_consume = $this->_db->f('sum_consume');
-
+*/
 //                     _debug_array($sql_arr);
                        //address@hidden 23/10/08 avoid retrieve data in first 
time, only render definition for headers (var myColumnDefs)
                        if ($dry_run)
@@ -834,7 +841,7 @@
                                }
                                $j++;
                        }
-
+/*
                        foreach ($dataset as &$entry)
                        {
                                $sql = "SELECT sum(amount) as consume FROM 
fm_request_consume WHERE request_id={$entry['request_id']['value']}";
@@ -848,7 +855,7 @@
                                        'attrib_id' => false,
                                );
                        }
-
+*/
                        $values = $this->custom->translate_value($dataset, 
$location_id);
 
                        return $values;

Modified: branches/Version-2_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uientity.inc.php     
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.uientity.inc.php     
2016-03-07 14:42:34 UTC (rev 14814)
@@ -2082,7 +2082,7 @@
                                                )
                                        );
                                }
-                               if 
(isset($GLOBALS['phpgw_info']['user']['apps']['controller']))
+                               if ($_enable_controller)
                                {
                                        $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', $this->acl_location);
                                        $_controls = 
$this->get_controls_at_component($location_id, $id);

Modified: branches/Version-2_0-branch/property/inc/class.uiproject.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiproject.inc.php    
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.uiproject.inc.php    
2016-03-07 14:42:34 UTC (rev 14814)
@@ -609,42 +609,30 @@
                        $function_exchange_values = '';
                        if ($lookup)
                        {
-                               $lookup_target = array
-                                       (
-                                       'menuaction' => 'property.ui' . $from . 
'.edit',
-                                       'origin' => phpgw::get_var('origin'),
-                                       'origin_id' => 
phpgw::get_var('origin_id')
-                               );
+                               $oArg = "{menuaction: 
'property.ui{$from}.edit',"
+                                       . "origin:'" . phpgw::get_var('origin') 
. "',"
+                                       . "origin_id:'" .  
phpgw::get_var('origin_id') ."',"
+                                       . "project_id: aData['project_id']}";
 
-                               for ($i = 0; $i < $count_uicols_name; $i++)
-                               {
-                                       if ($uicols['name'][$i] == 'project_id')
-                                       {
-                                               $function_exchange_values .= 
"var code_project = data.getData('" . $uicols["name"][$i] . "');" . "\r\n";
-                                               $function_exchange_values .= 
"valida('" . $GLOBALS['phpgw']->link('/index.php', $lookup_target) . "', 
code_project);";
-                                               $function_detail .= "var 
url=data+'&project_id='+param;" . "\r\n";
-                                               $function_detail .= 
"window.open(url,'_self');";
-                                       }
-                               }
-                               $datatable['exchange_values'] = 
$function_exchange_values;
-                               $datatable['valida'] = $function_detail;
-
-                               $query = phpgw::get_var('query');
-                               if (!empty($query))
-                               {
-                                       $code = <<<JS
-                                               function 
initCompleteDatatable(oSettings, json, oTable) 
-                                               { 
-                                                       setTimeout(function() {
-                                                               var api = 
oTable.api();
-                                                               api.search( 
'$query' ).draw();
-                                                       }, 1);
+                               $data['left_click_action'] = 
"window.open(phpGWLink('index.php', {$oArg}),'_self');";
                        }
+
+                       $query = phpgw::get_var('query');
+                       if (!empty($query))
+                       {
+                               $code = <<<JS
+                                       function 
initCompleteDatatable(oSettings, json, oTable)
+                                       {
+                                               setTimeout(function() {
+                                                       var api = oTable.api();
+                                                       api.search( '$query' 
).draw();
+                                               }, 1);
+               }
 JS;
 
-                                       $GLOBALS['phpgw']->js->add_code('', 
$code, true);
-                               }
+                               $GLOBALS['phpgw']->js->add_code('', $code, 
true);
                        }
+                       
 
                        self::add_javascript('property', 'portico', 
'project.index.js');
                        self::render_template_xsl('datatable_jquery', $data);

Modified: branches/Version-2_0-branch/property/inc/class.uirequest.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uirequest.inc.php    
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.uirequest.inc.php    
2016-03-07 14:42:34 UTC (rev 14814)
@@ -262,9 +262,14 @@
                        );
 
                        $count = count($values_combo_box);
-                       $values_combo_box[$count] = 
$this->bo->select_status_list('filter', $this->status_id);
+                       $values_combo_box[$count] = 
$this->bo->select_status_list('filter');
                        array_unshift($values_combo_box[$count], array('id' => 
'all', 'name' => lang('all')));
                        array_unshift($values_combo_box[$count], array('id' => 
'open', 'name' => lang('open')));
+                       foreach ($values_combo_box[$count] as &$_entry)
+                       {
+                               $_entry['selected'] = $_entry['id'] == 
$this->status_id ? 1 : 0;
+                       }
+                       unset($_entry);
                        $combos[] = array
                                (
                                'type' => 'filter',
@@ -281,6 +286,11 @@
                                $_degree['id'] ++;
                        }
                        array_unshift($values_combo_box[$count], array('id' => 
'', 'name' => lang('condition degree')));
+                       foreach ($values_combo_box[$count] as &$_entry)
+                       {
+                               $_entry['selected'] = $_entry['id'] == 
$this->degree_id ? 1 : 0;
+                       }
+                       unset($_entry);
                        $combos[] = array
                                (
                                'type' => 'filter',
@@ -684,7 +694,8 @@
                                        'allrows' => true,
                                        'select_all' => !!$project_id,
                                        'editor_action' => array(),
-                                       'field' => array()
+                                       'field' => array(),
+                                       'query' => phpgw::get_var('query')
                                )
                        );
 
@@ -732,7 +743,7 @@
                        $this->bo->read(array('project_id' => $project_id, 
'allrows' => $this->allrows,
                                'dry_run' => true));
                        $uicols = $this->bo->uicols;
-
+                       //_debug_array($uicols);die();
                        $count_uicols_name = count($uicols['name']);
 
                        $type_id = 4;

Modified: branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/inc/class.uiworkorder.inc.php  
2016-03-07 14:42:34 UTC (rev 14814)
@@ -2247,6 +2247,8 @@
                                'value_addition_percentage' => 
(isset($values['addition_percentage']) ? $values['addition_percentage'] : ''),
                                'lang_budget' => lang('Budget'),
                                'value_budget' => 
isset($this->receipt['error']) && $this->receipt['error'] ? 
$_POST['values']['budget'] : '',
+                               'check_for_budget' => abs($budget),
+
                                'lang_budget_statustext' => lang('Enter the 
budget'),
                                'lang_incl_tax' => lang('incl tax'),
                                'lang_calculation' => lang('Calculation'),

Modified: branches/Version-2_0-branch/property/js/portico/workorder.edit.js
===================================================================
--- branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/js/portico/workorder.edit.js   
2016-03-07 14:42:34 UTC (rev 14814)
@@ -13,6 +13,25 @@
                }
                check_and_submit_valid_session();
        });
+
+       $.formUtils.addValidator({
+               name: 'budget',
+               validatorFunction: function (value, $el, config, languaje, 
$form)
+               {
+                       //check_for_budget is defined in xsl-template
+                       var v = false;
+                       var budget = $('#field_budget').val();
+                       var contract_sum = $('#field_contract_sum').val();
+                       if ((budget != "" || contract_sum != "") || 
(check_for_budget > 0))
+                       {
+                               v = true;
+                       }
+                       return v;
+               },
+               errorMessage: lang['please enter either a budget or contrakt 
sum'],
+               errorMessageKey: ''
+       });
+
 });
 
 function check_and_submit_valid_session()

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2016-03-07 
14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2016-03-07 
14:42:34 UTC (rev 14814)
@@ -1417,7 +1417,7 @@
 request entry date     property        no      Registreringsdato for tiltak
 request id     property        no      Behov ID
 request start date     property        no      Behov startdato
-request status property        no      Status
+request status property        no      Status for behov
 request title  property        no      Tiltak tittel
 request description    property        no      Tilstandbeskrivelse
 requirement    property        no      Behov/pÄlegg
@@ -2053,4 +2053,5 @@
 entity group   common  no      RegisterGruppe
 modified on    common  no      Oppdatert
 property type  property        no      Type
-hjemmel        common  no      Hjemmel
\ No newline at end of file
+hjemmel        common  no      Hjemmel
+record has been edited common  no      data er editert
\ No newline at end of file

Modified: branches/Version-2_0-branch/property/templates/base/generic.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/generic.xsl     
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/templates/base/generic.xsl     
2016-03-07 14:42:34 UTC (rev 14814)
@@ -24,10 +24,10 @@
 
 <!-- add / edit  -->
 <xsl:template xmlns:php="http://php.net/xsl"; match="edit">
-               <script type="text/javascript">
-                       self.name="first_Window";
-                       <xsl:value-of select="lookup_functions"/>
-               </script>
+       <script type="text/javascript">
+               self.name="first_Window";
+               <xsl:value-of select="lookup_functions"/>
+       </script>
 
        <div id="generic_edit_tabview">
                        
@@ -39,81 +39,89 @@
        
                <form id="form" name="form" method="post" 
action="{$form_action}" class="pure-form pure-form-aligned">
                        <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>
                        
                        <div id="tab-content">
                                <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
                                <div id="generic">
                                        <fieldset>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="id_type != 'auto'">
+                                               <xsl:choose>
+                                                       <xsl:when test="id_type 
!= 'auto'">
                                                                <div 
class="pure-control-group">
                                                                        <label 
for="name">
-                                                                               
        <xsl:value-of select="php:function('lang', 'id')"/>
+                                                                               
<xsl:value-of select="php:function('lang', 'id')"/>
                                                                        </label>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="value_id != ''">
-                                                                               
                        <xsl:value-of select="value_id"/>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
        <input data-validation="number" type="text" name="values[{id_name}]" 
value="{value_id}">
-                                                                               
                                <xsl:attribute name="title">
-                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'Enter the ID')"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                               </div>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
                                                                        
<xsl:choose>
                                                                                
<xsl:when test="value_id != ''">
+                                                                               
        <xsl:value-of select="value_id"/>
+                                                                               
</xsl:when>
+                                                                               
<xsl:otherwise>
+                                                                               
        <input type="text" name="values[{id_name}]" value="{value_id}">
+                                                                               
                <xsl:attribute name="title">
+                                                                               
                        <xsl:value-of select="php:function('lang', 'Enter the 
ID')"/>
+                                                                               
                </xsl:attribute>
+                                                                               
                <xsl:attribute name="data-validation">
+                                                                               
                        <xsl:text>required</xsl:text>
+                                                                               
                </xsl:attribute>
+                                                                               
                <xsl:if test="id_type != 'varchar'">
+                                                                               
                        <xsl:attribute name="data-validation">
+                                                                               
                                <xsl:text>number</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:if>
+                                                                               
        </input>
+                                                                               
</xsl:otherwise>
+                                                                       
</xsl:choose>
+                                                               </div>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="value_id != ''">
                                                                                
<div class="pure-control-group">
                                                                                
        <label for="name">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'id')"/>
+                                                                               
                <xsl:value-of select="php:function('lang', 'id')"/>
                                                                                
        </label>
-                                                                               
                        <xsl:value-of select="value_id"/>
+                                                                               
        <xsl:value-of select="value_id"/>
                                                                                
</div>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
+                                                                       
</xsl:when>
+                                                               </xsl:choose>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
                                                        
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_id != ''">
-                                                                       <input 
type="hidden" name="{id_name}" value="{value_id}">
-                                                                       </input>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_id != ''">
+                                                               <input 
type="hidden" name="{id_name}" value="{value_id}">
+                                                               </input>
+                                                       </xsl:when>
+                                               </xsl:choose>
                                                        
-                                                       <xsl:for-each 
select="fields">
+                                               <xsl:for-each select="fields">
                                                                
                                                        <xsl:variable 
name="descr">
-                                                                               
<xsl:value-of select="descr"/>
+                                                               <xsl:value-of 
select="descr"/>
                                                        </xsl:variable>
                                                                                
                                                                                
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                       
<xsl:value-of select="php:function('lang', $descr)"/>
+                                                                       
<xsl:value-of select="$descr"/>
                                                                </label>
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="type='text'">
-                                                                               
                <textarea cols="{//textareacols}" rows="{//textarearows}" 
name="values[{name}]">
-                                                                               
                        <xsl:value-of select="value"/>
-                                                                               
                </textarea>
-                                                                               
        </xsl:when>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="type='text'">
+                                                                               
<textarea cols="{//textareacols}" rows="{//textarearows}" name="values[{name}]">
+                                                                               
        <xsl:value-of select="value"/>
+                                                                               
</textarea>
+                                                                       
</xsl:when>
                                                                        
<xsl:when test="type='varchar'">
-                                                                               
                <input type="text" name="values[{name}]" value="{value}" 
size="{size}">
-                                                                               
                        <xsl:attribute name="title">
-                                                                               
                                <xsl:value-of select="descr"/>
-                                                                               
                        </xsl:attribute>
+                                                                               
<input type="text" name="values[{name}]" value="{value}" size="{size}">
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="$descr"/>
+                                                                               
        </xsl:attribute>
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable!='1'">
                                                                                
                        <xsl:attribute name="data-validation">
@@ -126,7 +134,7 @@
                                                                        
<xsl:when test="type='integer' or type='int'">
                                                                                
<input data-validation="number" type="text" name="values[{name}]" 
value="{value}" size="{size}">
                                                                                
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select="descr"/>
+                                                                               
                <xsl:value-of select="$descr"/>
                                                                                
        </xsl:attribute>
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable='1'">
@@ -140,7 +148,7 @@
                                                                        
<xsl:when test="type='numeric'">
                                                                                
<input data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="." type="text" name="values[{name}]" 
value="{value}" size="{size}">
                                                                                
        <xsl:attribute name="title">
-                                                                               
                <xsl:value-of select="descr"/>
+                                                                               
                <xsl:value-of select="$descr"/>
                                                                                
        </xsl:attribute>
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable='1'">
@@ -149,28 +157,28 @@
                                                                                
                        </xsl:attribute>
                                                                                
                </xsl:when>
                                                                                
        </xsl:choose>
+                                                                               
</input>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="type='checkbox'">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="value = 1">
+                                                                               
                <input type="checkbox" name="values[{name}]" value="1" 
checked="checked">
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="$descr"/>
+                                                                               
                        </xsl:attribute>
                                                                                
                </input>
                                                                                
        </xsl:when>
-                                                                               
        <xsl:when test="type='checkbox'">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="value = 1">
-                                                                               
                                <input type="checkbox" name="values[{name}]" 
value="1" checked="checked">
-                                                                               
                                        <xsl:attribute name="title">
-                                                                               
                                                <xsl:value-of select="descr"/>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </input>
-                                                                               
                        </xsl:when>
-                                                                               
                        <xsl:otherwise>
-                                                                               
                                <input type="checkbox" name="values[{name}]" 
value="1">
-                                                                               
                                        <xsl:attribute name="title">
-                                                                               
                                                <xsl:value-of select="descr"/>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </input>
-                                                                               
                        </xsl:otherwise>
-                                                                               
                </xsl:choose>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="type='select'">
-                                                                               
                <select name="values[{name}]">
+                                                                               
        <xsl:otherwise>
+                                                                               
                <input type="checkbox" name="values[{name}]" value="1">
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="$descr"/>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </input>
+                                                                               
        </xsl:otherwise>
+                                                                               
</xsl:choose>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="type='select'">
+                                                                               
<select name="values[{name}]">
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable!='1'">
                                                                                
                        <xsl:attribute name="data-validation">
@@ -178,21 +186,21 @@
                                                                                
                        </xsl:attribute>
                                                                                
                </xsl:when>
                                                                                
        </xsl:choose>
-                                                                               
                        <option value="">
-                                                                               
                                <xsl:value-of select="php:function('lang', 
'select value')"/>
-                                                                               
                        </option>
-                                                                               
                        <xsl:for-each select="valueset">
-                                                                               
                                <option value="{id}">
-                                                                               
                                        <xsl:if test="selected != 0">
-                                                                               
                                                <xsl:attribute name="selected" 
value="selected"/>
-                                                                               
                                        </xsl:if>
-                                                                               
                                        <xsl:value-of select="name"/>
-                                                                               
                                </option>
-                                                                               
                        </xsl:for-each>
-                                                                               
                </select>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="type='multiple_select'">
-                                                                               
                <select name="values[{name}][]" multiple="multiple">
+                                                                               
        <option value="">
+                                                                               
                <xsl:value-of select="php:function('lang', 'select value')"/>
+                                                                               
        </option>
+                                                                               
        <xsl:for-each select="valueset">
+                                                                               
                <option value="{id}">
+                                                                               
                        <xsl:if test="selected != 0">
+                                                                               
                                <xsl:attribute name="selected" 
value="selected"/>
+                                                                               
                        </xsl:if>
+                                                                               
                        <xsl:value-of select="name"/>
+                                                                               
                </option>
+                                                                               
        </xsl:for-each>
+                                                                               
</select>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="type='multiple_select'">
+                                                                               
<select name="values[{name}][]" multiple="multiple">
                                                                                
        <xsl:choose>
                                                                                
                <xsl:when test="nullable!='1'">
                                                                                
                        <xsl:attribute name="data-validation">
@@ -200,70 +208,70 @@
                                                                                
                        </xsl:attribute>
                                                                                
                </xsl:when>
                                                                                
        </xsl:choose>
-                                                                               
                        <xsl:for-each select="valueset">
-                                                                               
                                <option value="{id}">
-                                                                               
                                        <xsl:if test="selected != 0">
-                                                                               
                                                <xsl:attribute name="selected" 
value="selected"/>
-                                                                               
                                        </xsl:if>
-                                                                               
                                        <xsl:value-of select="name"/>
-                                                                               
                                </option>
-                                                                               
                        </xsl:for-each>
-                                                                               
                </select>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="type='link'">
-                                                                               
                <input type="text" name="values[{name}]" value="{value}" 
size="30">
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
+                                                                               
        <xsl:for-each select="valueset">
+                                                                               
                <option value="{id}">
+                                                                               
                        <xsl:if test="selected != 0">
+                                                                               
                                <xsl:attribute name="selected" 
value="selected"/>
+                                                                               
                        </xsl:if>
+                                                                               
                        <xsl:value-of select="name"/>
+                                                                               
                </option>
+                                                                               
        </xsl:for-each>
+                                                                               
</select>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="type='link'">
+                                                                               
<input type="text" name="values[{name}]" value="{value}" size="30">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
                                                                                
                <xsl:when test="nullable!='1'">
                                                                                
                        <xsl:attribute name="data-validation">
                                                                                
                                <xsl:text>required</xsl:text>
                                                                                
                        </xsl:attribute>
                                                                                
                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="value!=''">
-                                                                               
                                <br/>
-                                                                               
                                <a href="{value}" target="_blank">
-                                                                               
                                        <xsl:value-of select="value"/>
-                                                                               
                                </a>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="value!=''">
+                                                                               
                <br/>
+                                                                               
                <a href="{value}" target="_blank">
+                                                                               
                        <xsl:value-of select="value"/>
+                                                                               
                </a>
                                                                                
        </xsl:when>
                                                                                
</xsl:choose>
+                                                                       
</xsl:when>
+                                                               </xsl:choose>
                                                                        
-                                       </div>
+                                                       </div>
                                                </xsl:for-each>
-                                       <xsl:call-template 
name="attributes_values"/>
+                                               <xsl:call-template 
name="attributes_values"/>
                                        </fieldset>
                                </div>
                        </div>
                        <div class="proplist-col">
                                <input type="submit" class="pure-button 
pure-button-primary" name="values[save]" value="{lang_save}" 
onMouseout="window.status='';return true;">
-                                                                       
<xsl:attribute name="title">
-                                                                               
<xsl:value-of select="php:function('lang', 'Save the record and return to the 
list')"/>
-                                                                       
</xsl:attribute>
-                                                               </input>
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'Save the record and return to the list')"/>
+                                       </xsl:attribute>
+                               </input>
                                <input type="submit" class="pure-button 
pure-button-primary" name="values[apply]" value="{lang_apply}" 
onMouseout="window.status='';return true;">
-                                                                       
<xsl:attribute name="title">
-                                                                               
<xsl:value-of select="php:function('lang', 'Apply the values')"/>
-                                                                       
</xsl:attribute>
-                                                               </input>
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'Apply the values')"/>
+                                       </xsl:attribute>
+                               </input>
                                <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="title">
-                                                                               
<xsl:value-of select="php:function('lang', 'Leave the record untouched and 
return to the list')"/>
-                                                                       
</xsl:attribute>
-                                                               </input>
-                               </div>
-                       </form>
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'Leave the record untouched and return to the 
list')"/>
+                                       </xsl:attribute>
+                               </input>
+                       </div>
+               </form>
                <xsl:variable name="cancel_url">
                        <xsl:value-of select="cancel_url"/>
                </xsl:variable>
                <form name="cancel_form" id="cancel_form" 
action="{$cancel_url}" method="post">
                </form>
-               </div>
+       </div>
 </xsl:template>

Modified: branches/Version-2_0-branch/property/templates/base/project.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/project.xsl     
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/templates/base/project.xsl     
2016-03-07 14:42:34 UTC (rev 14814)
@@ -147,7 +147,7 @@
                                                        <xsl:attribute 
name="data-validation">
                                                                
<xsl:text>required</xsl:text>
                                                        </xsl:attribute>
-                                                       <option value="0">
+                                                       <option value="">
                                                                <xsl:value-of 
select="php:function('lang', 'select')"/>
                                                        </option>
                                                        <xsl:apply-templates 
select="project_types/options"/>

Modified: branches/Version-2_0-branch/property/templates/base/workorder.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/workorder.xsl   
2016-03-07 14:40:32 UTC (rev 14813)
+++ branches/Version-2_0-branch/property/templates/base/workorder.xsl   
2016-03-07 14:42:34 UTC (rev 14814)
@@ -1,516 +1,516 @@
 
 <!-- $Id$ -->
 <xsl:template match="data">
-               <xsl:choose>
-                       <xsl:when test="edit">
-                               <xsl:apply-templates select="edit"/>
-                       </xsl:when>
-                       <xsl:when test="add">
-                               <xsl:apply-templates select="add"/>
-                       </xsl:when>
-                       <xsl:when test="view">
-                               <xsl:apply-templates select="view"/>
-                       </xsl:when>
-               </xsl:choose>
+       <xsl:choose>
+               <xsl:when test="edit">
+                       <xsl:apply-templates select="edit"/>
+               </xsl:when>
+               <xsl:when test="add">
+                       <xsl:apply-templates select="add"/>
+               </xsl:when>
+               <xsl:when test="view">
+                       <xsl:apply-templates select="view"/>
+               </xsl:when>
+       </xsl:choose>
        <xsl:call-template name="jquery_phpgw_i18n"/>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template match="add">
-               <xsl:apply-templates select="menu"/>
-               <table width="50%" cellpadding="2" cellspacing="2" 
align="center">
-                       <tr height="50">
-                               <td>
-                                       <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}">
+       <xsl:apply-templates select="menu"/>
+       <table width="50%" cellpadding="2" cellspacing="2" align="center">
+               <tr height="50">
+                       <td>
+                               <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" class="pure-button 
pure-button-primary forms" name="add" value="{$lang_add}">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_add_statustext"/>
-                                                       </xsl:attribute>
-                                               </input>
-                                       </form>
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="lang_add_statustext"/>
+                                               </xsl:attribute>
+                                       </input>
+                               </form>
                        </td>
                        <td>
-                                       <xsl:variable name="search_action">
-                                               <xsl:value-of 
select="search_action"/>
-                                       </xsl:variable>
-                                       <xsl:variable name="lang_search">
-                                               <xsl:value-of 
select="lang_search"/>
-                                       </xsl:variable>
-                                       <form method="post" 
action="{$search_action}">
+                               <xsl:variable name="search_action">
+                                       <xsl:value-of select="search_action"/>
+                               </xsl:variable>
+                               <xsl:variable name="lang_search">
+                                       <xsl:value-of select="lang_search"/>
+                               </xsl:variable>
+                               <form method="post" action="{$search_action}">
                                        <input type="submit" class="pure-button 
pure-button-primary forms" name="search" value="{$lang_search}">
-                                                       <xsl:attribute 
name="title">
-                                                               <xsl:value-of 
select="lang_search_statustext"/>
-                                                       </xsl:attribute>
-                                               </input>
-                                       </form>
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="lang_search_statustext"/>
+                                               </xsl:attribute>
+                                       </input>
+                               </form>
                        </td>
                        <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}">
+                               <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" class="pure-button 
pure-button-primary forms" name="done" value="{$lang_done}">
-                                                       <xsl:attribute 
name="onMouseover">
-                                                               
<xsl:text>window.status='</xsl:text>
-                                                               <xsl:value-of 
select="lang_done_statustext"/>
-                                                               <xsl:text>'; 
return true;</xsl:text>
-                                                       </xsl:attribute>
-                                               </input>
-                                       </form>
-                               </td>
-                       </tr>
-               </table>
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_done_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </form>
+                       </td>
+               </tr>
+       </table>
 </xsl:template>
 
 <!-- add / edit -->
 <xsl:template xmlns:php="http://php.net/xsl"; match="edit">
 
-               <xsl:variable name="lang_done">
-                       <xsl:value-of select="lang_done"/>
-               </xsl:variable>
-               <xsl:variable name="lang_save">
-                       <xsl:value-of select="lang_save"/>
-               </xsl:variable>
-                       <xsl:choose>
-                               <xsl:when test="msgbox_data != ''">
+       <xsl:variable name="lang_done">
+               <xsl:value-of select="lang_done"/>
+       </xsl:variable>
+       <xsl:variable name="lang_save">
+               <xsl:value-of select="lang_save"/>
+       </xsl:variable>
+       <xsl:choose>
+               <xsl:when test="msgbox_data != ''">
                        <dl>
                                <dt>
-                                                       <xsl:call-template 
name="msgbox"/>
+                                       <xsl:call-template name="msgbox"/>
                                </dt>
                        </dl>
-                               </xsl:when>
-                       </xsl:choose>
+               </xsl:when>
+       </xsl:choose>
        <table cellpadding="2" cellspacing="2" align="center">
-                       <div id="receipt"></div>
-                       <input type="hidden" id = "lean" name="lean" 
value="{lean}"/>
-                       <xsl:choose>
-                               <xsl:when test="mode='edit' and lean = 0">
-                                       <td>
-                                               <table>
-                                                       <tr height="50">
-                                                               <td>
+               <div id="receipt"></div>
+               <input type="hidden" id = "lean" name="lean" value="{lean}"/>
+               <xsl:choose>
+                       <xsl:when test="mode='edit' and lean = 0">
+                               <td>
+                                       <table>
+                                               <tr height="50">
+                                                       <td>
                                                                <input 
type="button" class="pure-button pure-button-primary" name="save" 
value="{$lang_save}" onClick="submit_workorder();">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_save_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </td>
-                                                               <td>
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_save_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                                       <td>
                                                                <input 
type="button" class="pure-button pure-button-primary" name="done" 
value="{$lang_done}" onClick="document.done_form.submit();">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_done_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </td>
-                                                       </tr>
-                                               </table>
-                                       </td>
-                               </xsl:when>
-                       </xsl:choose>
-                       <xsl:choose>
-                               <xsl:when test="value_workorder_id!='' and 
mode='edit' and lean = 0">
-                                       <td>
-                                               <table>
-                                                       <tr>
-                                                               <td 
valign="top">
-                                                                       
<xsl:variable name="lang_calculate">
-                                                                               
<xsl:value-of select="lang_calculate"/>
-                                                                       
</xsl:variable>
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_done_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                               </tr>
+                                       </table>
+                               </td>
+                       </xsl:when>
+               </xsl:choose>
+               <xsl:choose>
+                       <xsl:when test="value_workorder_id!='' and mode='edit' 
and lean = 0">
+                               <td>
+                                       <table>
+                                               <tr>
+                                                       <td valign="top">
+                                                               <xsl:variable 
name="lang_calculate">
+                                                                       
<xsl:value-of select="lang_calculate"/>
+                                                               </xsl:variable>
                                                                <input 
type="button" class="pure-button pure-button-primary" name="calculate" 
value="{$lang_calculate}" onClick="calculate_workorder()">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_calculate_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </td>
-                                                               <td 
valign="top">
-                                                                       
<xsl:variable name="lang_send">
-                                                                               
<xsl:value-of select="lang_send"/>
-                                                                       
</xsl:variable>
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_calculate_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                                       <td valign="top">
+                                                               <xsl:variable 
name="lang_send">
+                                                                       
<xsl:value-of select="lang_send"/>
+                                                               </xsl:variable>
                                                                <input 
type="button" class="pure-button pure-button-primary" name="send" 
value="{$lang_send}" onClick="send_workorder()">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_send_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </td>
-                                                       </tr>
-                                               </table>
-                                       </td>
-                               </xsl:when>
-                       </xsl:choose>
-               </table>
-               <xsl:variable name="form_action">
-                       <xsl:value-of select="form_action"/>
-               </xsl:variable>
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_send_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </td>
+                                               </tr>
+                                       </table>
+                               </td>
+                       </xsl:when>
+               </xsl:choose>
+       </table>
+       <xsl:variable name="form_action">
+               <xsl:value-of select="form_action"/>
+       </xsl:variable>
        <form ENCTYPE="multipart/form-data" method="post" id='form' name="form" 
action="{$form_action}" class= "pure-form pure-form-aligned">
-                       <input type="hidden" name="send_workorder" value=""/>
-                       <input type="hidden" name='calculate_workorder'  
value=""/>
+               <input type="hidden" name="send_workorder" value=""/>
+               <input type="hidden" name='calculate_workorder'  value=""/>
                <xsl:variable name="decimal_separator">
                        <xsl:value-of select="decimal_separator"/>
                </xsl:variable>
 
                <input id="order_tab" type="hidden" name="tab" value=""/>
                <div id="tab-content">
-                               <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
-                                       <div id="general">
+                       <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
+                       <div id="general">
                                <fieldset>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_project_id!=''">
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_project_id!=''">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_project_id"/>
+                                                                       
<xsl:value-of select="lang_project_id"/>
                                                                </label>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="lean = 0">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="lean = 0">
                                                                                
<xsl:variable name="project_link">
                                                                                
        <xsl:value-of select="project_link"/>&amp;id=<xsl:value-of 
select="value_project_id"/>
                                                                                
</xsl:variable>
-                                                                               
                        <a href="{$project_link}">
-                                                                               
                                <xsl:value-of select="value_project_id"/>
-                                                                               
                        </a>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <xsl:value-of select="value_project_id"/>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                                               
        <input type="hidden" name="values[project_id]" 
value="{value_project_id}"/>
+                                                                               
<a href="{$project_link}">
+                                                                               
        <xsl:value-of select="value_project_id"/>
+                                                                               
</a>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:value-of select="value_project_id"/>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                               <input 
type="hidden" name="values[project_id]" value="{value_project_id}"/>
                                                        </div>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
+                                               </xsl:when>
+                                               <xsl:otherwise>
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_project_id"/>
+                                                                       
<xsl:value-of select="lang_project_id"/>
                                                                </label>
-                                                                               
        <input type="text" name="values[project_id]" value="">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="lang_title_statustext"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
+                                                               <input 
type="text" name="values[project_id]" value="">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="lang_title_statustext"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                        </div>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_project_name"/>
+                                                       <xsl:value-of 
select="lang_project_name"/>
                                                </label>
-                                                                       
<xsl:value-of select="value_project_name"/>
+                                               <xsl:value-of 
select="value_project_name"/>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="php:function('lang', 'move to another project')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'move to another project')"/>
                                                                </label>
-                                                                               
        <input type="text" name="values[new_project_id]" value="">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'move to 
another project')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
+                                                               <input 
type="text" name="values[new_project_id]" value="">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'move to another project')"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when 
test="location_template_type='form'">
+                                                       <xsl:call-template 
name="location_form"/>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:call-template 
name="location_view"/>
                                                        <xsl:choose>
-                                                               <xsl:when 
test="location_template_type='form'">
-                                                                       
<xsl:call-template name="location_form"/>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:call-template name="location_view"/>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="contact_phone !=''">
+                                                               <xsl:when 
test="contact_phone !=''">
                                                                        <div 
class="pure-control-group">
                                                                                
<label for="name">
-                                                                               
                        <xsl:value-of select="lang_contact_phone"/>
+                                                                               
        <xsl:value-of select="lang_contact_phone"/>
                                                                                
</label>
-                                                                               
                        <xsl:value-of select="contact_phone"/>
+                                                                               
<xsl:value-of select="contact_phone"/>
                                                                        </div>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </xsl:otherwise>
+                                                               </xsl:when>
                                                        </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="suppressmeter =''">
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="suppressmeter 
=''">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_power_meter"/>
+                                                                       
<xsl:value-of select="lang_power_meter"/>
                                                                </label>
-                                                                               
        <xsl:value-of select="value_power_meter"/>
+                                                               <xsl:value-of 
select="value_power_meter"/>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_coordinator"/>
+                                                       <xsl:value-of 
select="lang_coordinator"/>
                                                </label>
-                                                                       
<xsl:value-of select="value_coordinator"/>
+                                               <xsl:value-of 
select="value_coordinator"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'janitor')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'janitor')"/>
                                                </label>
-                                                                       <select 
name="values[user_id]" class="forms" >
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'janitor')"/>
-                                                                               
</xsl:attribute>
-                                                                               
<option value="">
-                                                                               
        <xsl:value-of select="php:function('lang', 'select')"/>
-                                                                               
</option>
-                                                                               
<xsl:apply-templates select="user_list/options"/>
-                                                                       
</select>
+                                               <select name="values[user_id]" 
class="forms" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'janitor')"/>
+                                                       </xsl:attribute>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'select')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="user_list/options"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_branch"/>
+                                                       <xsl:value-of 
select="lang_branch"/>
                                                </label>
-                                                                       
<xsl:for-each select="branch_list[selected='selected']">
-                                                                               
<xsl:value-of select="name"/>
-                                                                               
<xsl:if test="position() != last()">, </xsl:if>
-                                                                       
</xsl:for-each>
+                                               <xsl:for-each 
select="branch_list[selected='selected']">
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:if 
test="position() != last()">, </xsl:if>
+                                               </xsl:for-each>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_other_branch"/>
+                                                       <xsl:value-of 
select="lang_other_branch"/>
                                                </label>
-                                                                       
<xsl:value-of select="value_other_branch"/>
+                                               <xsl:value-of 
select="value_other_branch"/>
                                        </div>
-                                                       <xsl:for-each 
select="value_origin">
+                                       <xsl:for-each select="value_origin">
                                                <div class="pure-control-group">
                                                        <label for="name">
-                                                                               
<xsl:value-of select="descr"/>
+                                                               <xsl:value-of 
select="descr"/>
                                                        </label>
-                                                                               
<table>
-                                                                               
        <xsl:for-each select="data">
-                                                                               
                <tr>
-                                                                               
                        <td class="th_text" align="left">
-                                                                               
                                <a href="{link}" title="{statustext}">
-                                                                               
                                        <xsl:value-of select="id"/>
-                                                                               
                                </a>
-                                                                               
                                <xsl:text> </xsl:text>
-                                                                               
                        </td>
-                                                                               
                </tr>
-                                                                               
        </xsl:for-each>
-                                                                               
</table>
+                                                       <table>
+                                                               <xsl:for-each 
select="data">
+                                                                       <tr>
+                                                                               
<td class="th_text" align="left">
+                                                                               
        <a href="{link}" title="{statustext}">
+                                                                               
                <xsl:value-of select="id"/>
+                                                                               
        </a>
+                                                                               
        <xsl:text> </xsl:text>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </xsl:for-each>
+                                                       </table>
                                                </div>
-                                                       </xsl:for-each>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_workorder_id!=''">
+                                       </xsl:for-each>
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_workorder_id!=''">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_workorder_id"/>
+                                                                       
<xsl:value-of select="lang_workorder_id"/>
                                                                </label>
-                                                                               
        <xsl:value-of select="value_workorder_id"/>
+                                                               <xsl:value-of 
select="value_workorder_id"/>
                                                        </div>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="mode='edit'">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="mode='edit'">
                                                                        <div 
class="pure-control-group">
                                                                                
<label for="name">
-                                                                               
                        <xsl:value-of select="lang_copy_workorder"/>
+                                                                               
        <xsl:value-of select="lang_copy_workorder"/>
                                                                                
</label>
-                                                                               
                        <input type="checkbox" name="values[copy_workorder]" 
value="True">
-                                                                               
                                <xsl:attribute name="title">
-                                                                               
                                        <xsl:value-of 
select="lang_copy_workorder_statustext"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
+                                                                               
<input type="checkbox" name="values[copy_workorder]" value="True">
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="lang_copy_workorder_statustext"/>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
                                                                        </div>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
                                                                </xsl:when>
                                                        </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_title"/>
+                                                       <xsl:value-of 
select="lang_title"/>
                                                </label>
-                                                                       <input 
type="hidden" name="values[origin]" value="{value_origin_type}"/>
-                                                                       <input 
type="hidden" name="values[origin_id]" value="{value_origin_id}"/>
-                                                                       <input 
type="text" name="values[title]" value="{value_title}" size="60">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_title_statustext"/>
-                                                                               
</xsl:attribute>
+                                               <input type="hidden" 
name="values[origin]" value="{value_origin_type}"/>
+                                               <input type="hidden" 
name="values[origin_id]" value="{value_origin_id}"/>
+                                               <input type="text" 
name="values[title]" value="{value_title}" size="60">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_title_statustext"/>
+                                                       </xsl:attribute>
                                                        <xsl:attribute 
name="data-validation">
                                                                
<xsl:text>required</xsl:text>
                                                        </xsl:attribute>
-                                                                       </input>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<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:value-of 
select="value_descr"/>
+                                               </textarea>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_status"/>
+                                                       <xsl:value-of 
select="lang_status"/>
                                                </label>
-                                                                       
<xsl:call-template name="status_select"/>
+                                               <xsl:call-template 
name="status_select"/>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="need_approval='1' and mode='edit'">
+                                       <xsl:choose>
+                                               <xsl:when 
test="need_approval='1' and mode='edit'">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_ask_approval"/>
+                                                                       
<xsl:value-of select="lang_ask_approval"/>
                                                                </label>
                                                                <div 
class="pure-custom">
-                                                                               
        <table>
-                                                                               
                <xsl:for-each select="value_approval_mail_address">
-                                                                               
                        <tr>
-                                                                               
                                <td>
-                                                                               
                                        <input type="checkbox" 
name="values[approval][{id}]" value="True">
-                                                                               
                                                <xsl:attribute name="title">
-                                                                               
                                                        <xsl:value-of 
select="//lang_ask_approval_statustext"/>
-                                                                               
                                                </xsl:attribute>
-                                                                               
                                        </input>
-                                                                               
                                </td>
-                                                                               
                                <td>
-                                                                               
                                        <input type="text" 
name="values[mail_address][{id}]" value="{address}">
-                                                                               
                                                <xsl:attribute name="title">
-                                                                               
                                                        <xsl:value-of 
select="//lang_ask_approval_statustext"/>
-                                                                               
                                                </xsl:attribute>
-                                                                               
                                        </input>
-                                                                               
                                        <xsl:if test="default = '1'">
-                                                                               
                                                <xsl:text>&lt;=</xsl:text>
-                                                                               
                                        </xsl:if>
-                                                                               
                                </td>
-                                                                               
                        </tr>
-                                                                               
                </xsl:for-each>
-                                                                               
        </table>
+                                                                       <table>
+                                                                               
<xsl:for-each select="value_approval_mail_address">
+                                                                               
        <tr>
+                                                                               
                <td>
+                                                                               
                        <input type="checkbox" name="values[approval][{id}]" 
value="True">
+                                                                               
                                <xsl:attribute name="title">
+                                                                               
                                        <xsl:value-of 
select="//lang_ask_approval_statustext"/>
+                                                                               
                                </xsl:attribute>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
                <td>
+                                                                               
                        <input type="text" name="values[mail_address][{id}]" 
value="{address}">
+                                                                               
                                <xsl:attribute name="title">
+                                                                               
                                        <xsl:value-of 
select="//lang_ask_approval_statustext"/>
+                                                                               
                                </xsl:attribute>
+                                                                               
                        </input>
+                                                                               
                        <xsl:if test="default = '1'">
+                                                                               
                                <xsl:text>&lt;=</xsl:text>
+                                                                               
                        </xsl:if>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
</xsl:for-each>
+                                                                       </table>
                                                                </div>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_workorder_id!=''">
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_workorder_id!=''">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="php:function('lang', 'approved')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'approved')"/>
                                                                </label>
-                                                                               
        <input type="hidden" name="values[approved_orig]" 
value="{value_approved}"/>
-                                                                               
        <input type="checkbox" name="values[approved]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 
'approved')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_approved = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
                <xsl:if test="mode != 'edit'">
-                                                                               
                        <xsl:attribute name="disabled">
-                                                                               
                                <xsl:text>disabled</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
+                                                               <input 
type="hidden" name="values[approved_orig]" value="{value_approved}"/>
+                                                               <input 
type="checkbox" name="values[approved]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'approved')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_approved = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                                       <xsl:if 
test="mode != 'edit'">
+                                                                               
<xsl:attribute name="disabled">
+                                                                               
        <xsl:text>disabled</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                               </input>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_remark"/>
+                                                       <xsl:value-of 
select="lang_remark"/>
                                                </label>
-                                                                       
<textarea cols="60" rows="6" name="values[remark]">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_remark_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_remark"/>
-                                                                       
</textarea>
+                                               <textarea cols="60" rows="6" 
name="values[remark]">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_remark_statustext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_remark"/>
+                                               </textarea>
                                        </div>
                                </fieldset>
-                                       </div>
-                                       <div id="budget">
+                       </div>
+                       <div id="budget">
                                <fieldset>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'Workorder start date')"/>
-                                                                       <div 
id="ctx"><!--Align lightbox to me--></div> 
+                                                       <xsl:value-of 
select="php:function('lang', 'Workorder start date')"/>
+                                                       <div id="ctx"><!--Align 
lightbox to me--></div>
                                                </label>
-                                                                       <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="php:function('lang', 'Select the estimated start date for 
the Project')"/>
-                                                                               
</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="php:function('lang', 'Select the estimated start date for the 
Project')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_end_date">
-                                                                       
<xsl:value-of select="php:function('lang', 'Workorder end date')"/>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_end_date">
+                                                       <xsl:value-of 
select="php:function('lang', 'Workorder end date')"/>
+                                               </xsl:variable>
                                                <label for="name">
-                                                                       
<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">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="$lang_end_date"/>
-                                                                               
</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"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_tender_deadline">
-                                                                       
<xsl:value-of select="php:function('lang', 'tender deadline')"/>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_tender_deadline">
+                                                       <xsl:value-of 
select="php:function('lang', 'tender deadline')"/>
+                                               </xsl:variable>
                                                <label for="name">
-                                                                       
<xsl:value-of select="$lang_tender_deadline"/>
+                                                       <xsl:value-of 
select="$lang_tender_deadline"/>
                                                </label>
-                                                                       <input 
type="text" id="values_tender_deadline" name="values[tender_deadline]" 
size="10" value="{value_tender_deadline}" readonly="readonly">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="$lang_tender_deadline"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" 
id="values_tender_deadline" name="values[tender_deadline]" size="10" 
value="{value_tender_deadline}" readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="$lang_tender_deadline"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_tender_received">
-                                                                       
<xsl:value-of select="php:function('lang', 'tender received')"/>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_tender_received">
+                                                       <xsl:value-of 
select="php:function('lang', 'tender received')"/>
+                                               </xsl:variable>
                                                <label for="name">
-                                                                       
<xsl:value-of select="$lang_tender_received"/>
+                                                       <xsl:value-of 
select="$lang_tender_received"/>
                                                </label>
-                                                                       <input 
type="text" id="values_tender_received" name="values[tender_received]" 
size="10" value="{value_tender_received}" readonly="readonly">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="$lang_tender_received"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                                       <xsl:if 
test="value_tender_delay > 0">
-                                                                               
<xsl:text> </xsl:text>
-                                                                               
<xsl:value-of select="php:function('lang', 'delay')"/>
-                                                                               
<xsl:text> </xsl:text>
-                                                                               
<xsl:value-of select="value_tender_delay"/>
-                                                                       
</xsl:if>
+                                               <input type="text" 
id="values_tender_received" name="values[tender_received]" size="10" 
value="{value_tender_received}" readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="$lang_tender_received"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                               <xsl:if 
test="value_tender_delay > 0">
+                                                       <xsl:text> </xsl:text>
+                                                       <xsl:value-of 
select="php:function('lang', 'delay')"/>
+                                                       <xsl:text> </xsl:text>
+                                                       <xsl:value-of 
select="value_tender_delay"/>
+                                               </xsl:if>
                                        </div>
                                        <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_inspection_on_completion">
-                                                                       
<xsl:value-of select="php:function('lang', 'inspection on completion')"/>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_inspection_on_completion">
+                                                       <xsl:value-of 
select="php:function('lang', 'inspection on completion')"/>
+                                               </xsl:variable>
                                                <label for="name">
-                                                                       
<xsl:value-of select="$lang_inspection_on_completion"/>
+                                                       <xsl:value-of 
select="$lang_inspection_on_completion"/>
                                                </label>
-                                                                       <input 
type="text" id="values_inspection_on_completion" 
name="values[inspection_on_completion]" size="10" 
value="{value_inspection_on_completion}" readonly="readonly">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="$lang_inspection_on_completion"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                                       <xsl:if 
test="value_end_date_delay > 0">
-                                                                               
<xsl:text> </xsl:text>
-                                                                               
<xsl:value-of select="php:function('lang', 'delay')"/>
-                                                                               
<xsl:text> </xsl:text>
-                                                                               
<xsl:value-of select="value_end_date_delay"/>
-                                                                       
</xsl:if>
+                                               <input type="text" 
id="values_inspection_on_completion" name="values[inspection_on_completion]" 
size="10" value="{value_inspection_on_completion}" readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="$lang_inspection_on_completion"/>
+                                                       </xsl:attribute>
+                                               </input>
+                                               <xsl:if 
test="value_end_date_delay > 0">
+                                                       <xsl:text> </xsl:text>
+                                                       <xsl:value-of 
select="php:function('lang', 'delay')"/>
+                                                       <xsl:text> </xsl:text>
+                                                       <xsl:value-of 
select="value_end_date_delay"/>
+                                               </xsl:if>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="mode='edit'">
-                                                                       
<xsl:call-template name="event_form"/>
-                                                                       
<xsl:call-template name="vendor_form"/>
+                                       <xsl:choose>
+                                               <xsl:when test="mode='edit'">
+                                                       <xsl:call-template 
name="event_form"/>
+                                                       <xsl:call-template 
name="vendor_form"/>
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="php:function('lang', 'send order')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'send order')"/>
                                                                </label>
                                                                <div 
class="pure-custom">
                                                                        
<xsl:for-each select="datatable_def">
@@ -529,138 +529,145 @@
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
                <xsl:value-of select="php:function('lang', 'extra mail 
address')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'extra mail address')"/>
                                                                </label>
-                                                                               
                <input type="text" name="values[vendor_email][]" 
value="{value_extra_mail_address}">
-                                                                               
                        <xsl:attribute name="title">
-                                                                               
                                <xsl:value-of select="php:function('lang', 'The 
order will also be sent to this one')"/>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </input>
+                                                               <input 
type="text" name="values[vendor_email][]" value="{value_extra_mail_address}">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'The order will also be sent to this 
one')"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
                                                        </div>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:call-template name="event_view"/>
-                                                                       
<xsl:call-template name="vendor_view"/>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                                       <xsl:call-template 
name="ecodimb_form"/>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:call-template 
name="event_view"/>
+                                                       <xsl:call-template 
name="vendor_view"/>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                                       <xsl:call-template name="ecodimb_form"/>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="b_group_data/lang_b_account"/>
+                                                       <xsl:value-of 
select="b_group_data/lang_b_account"/>
                                                </label>
-                                                                       <input 
type="text" size="9" value="{b_group_data/value_b_account_id}" 
readonly="readonly">
-                                                                               
<xsl:attribute name="disabled">
-                                                                               
        <xsl:text>disabled</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                                       <input 
type="text" size="30" value="{b_group_data/value_b_account_name}" 
readonly="readonly">
-                                                                               
<xsl:attribute name="disabled">
-                                                                               
        <xsl:text>disabled</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" size="9" 
value="{b_group_data/value_b_account_id}" readonly="readonly">
+                                                       <xsl:attribute 
name="disabled">
+                                                               
<xsl:text>disabled</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
+                                               <input type="text" size="30" 
value="{b_group_data/value_b_account_name}" readonly="readonly">
+                                                       <xsl:attribute 
name="disabled">
+                                                               
<xsl:text>disabled</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="mode='edit'">
-                                                                       
<xsl:call-template name="b_account_form"/>
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:call-template name="b_account_view"/>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="mode='edit'">
+                                                       <xsl:call-template 
name="b_account_form"/>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:call-template 
name="b_account_view"/>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_cat_sub"/>
+                                                       <xsl:value-of 
select="lang_cat_sub"/>
                                                </label>
-                                                                       
<xsl:call-template name="cat_sub_select"/>
+                                               <xsl:call-template 
name="cat_sub_select"/>
                                        </div>
                                        <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_continuous">
-                                                                       
<xsl:value-of select="php:function('lang', 'continuous')"/>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_continuous">
+                                                       <xsl:value-of 
select="php:function('lang', 'continuous')"/>
+                                               </xsl:variable>
                                                <label for="name">
-                                                                       
<xsl:value-of select="$lang_continuous"/>
+                                                       <xsl:value-of 
select="$lang_continuous"/>
                                                </label>
-                                                                       <input 
type="checkbox" name="values[continuous]" value="1">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="$lang_continuous"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:if test="value_continuous = '1'">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:if test="mode != 'edit'">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text>disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                       </input>
+                                               <input type="checkbox" 
name="values[continuous]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="$lang_continuous"/>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="value_continuous = '1'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                                       <xsl:if test="mode != 
'edit'">
+                                                               <xsl:attribute 
name="disabled">
+                                                                       
<xsl:text>disabled</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
-                                                               <xsl:variable 
name="lang_fictive_periodization">
-                                                                       
<xsl:value-of select="php:function('lang', 'fictive periodization')"/>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_fictive_periodization">
+                                                       <xsl:value-of 
select="php:function('lang', 'fictive periodization')"/>
+                                               </xsl:variable>
                                                <label for="name">
-                                                                       
<xsl:value-of select="$lang_fictive_periodization"/>
+                                                       <xsl:value-of 
select="$lang_fictive_periodization"/>
                                                </label>
-                                                                       <input 
type="checkbox" name="values[fictive_periodization]" value="1">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="$lang_fictive_periodization"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:if test="value_fictive_periodization = '1'">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:if test="mode != 'edit'">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text>disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                       </input>
+                                               <input type="checkbox" 
name="values[fictive_periodization]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="$lang_fictive_periodization"/>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="value_fictive_periodization = '1'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                                       <xsl:if test="mode != 
'edit'">
+                                                               <xsl:attribute 
name="disabled">
+                                                                       
<xsl:text>disabled</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'contract sum')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'contract sum')"/>
                                                </label>
-                                               <input type="text" 
data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="{$decimal_separator}" 
name="values[contract_sum]" value="{value_contract_sum}">
-                                                       <xsl:attribute 
name="data-validation-optional">
+                                               <input type="text" 
data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="{$decimal_separator}" 
id="field_contract_sum" name="values[contract_sum]" 
value="{value_contract_sum}">
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>budget</xsl:text>
+                                                       </xsl:attribute>
+                                                       <!--xsl:attribute 
name="data-validation-optional">
                                                                
<xsl:text>true</xsl:text>
-                                                       </xsl:attribute>
-                                                                       </input>
-                                                                       
<xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
+                                                       </xsl:attribute-->
+                                               </input>
+                                               <xsl:text> </xsl:text> [ 
<xsl:value-of select="currency"/> ]
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_addition_percentage"/>
+                                                       <xsl:value-of 
select="lang_addition_percentage"/>
                                                </label>
                                                <input type="text" 
data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="{$decimal_separator}" 
name="values[addition_percentage]" value="{value_addition_percentage}" >
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_addition_percentage_statustext"/>
-                                                                               
</xsl:attribute>
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_addition_percentage_statustext"/>
+                                                       </xsl:attribute>
                                                        <xsl:attribute 
name="data-validation-optional">
                                                                
<xsl:text>true</xsl:text>
                                                        </xsl:attribute>
-                                                                       </input>
-                                                                       
<xsl:text> </xsl:text> [ % ]
+                                               </input>
+                                               <xsl:text> </xsl:text> [ % ]
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_budget"/>
+                                                       <xsl:value-of 
select="lang_budget"/>
                                                </label>
-                                               <input type="text" 
data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="{$decimal_separator}" name="values[budget]" 
value="{value_budget}">
+                                               <input type="text" 
data-validation="number"  
data-validation-decimal-separator="{$decimal_separator}" id='field_budget' 
name="values[budget]" value="{value_budget}">
                                                        <xsl:attribute 
name="title">
                                                                <xsl:value-of 
select="lang_budget_statustext"/>
                                                        </xsl:attribute>
-                                                       <xsl:attribute 
name="data-validation-optional">
+                                                       <xsl:attribute 
name="data-validation">
+                                                               
<xsl:text>budget</xsl:text>
+                                                       </xsl:attribute>
+
+                                                       <!--xsl:attribute 
name="data-validation-optional">
                                                                
<xsl:text>true</xsl:text>
-                                                       </xsl:attribute>
+                                                       </xsl:attribute-->
                                                </input>
                                                <xsl:text> </xsl:text> [ 
<xsl:value-of select="currency"/> ]
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_addition_rs"/>
+                                                       <xsl:value-of 
select="lang_addition_rs"/>
                                                </label>
                                                <input type="text" 
data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="{$decimal_separator}" 
name="values[addition_rs]" value="{value_addition_rs}">
                                                        <xsl:attribute 
name="title">
@@ -674,42 +681,42 @@
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'when')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'when')"/>
                                                </label>
                                                <div class="pure-custom">
-                                                                       <table>
-                                                                               
<tr>
+                                                       <table>
+                                                               <tr>
+                                                                       <td>
+                                                                               
<select name="values[budget_year]">
+                                                                               
        <xsl:attribute name="title">
+                                                                               
                <xsl:value-of select="php:function('lang', 'year')"/>
+                                                                               
        </xsl:attribute>
+                                                                               
        <option value="0">
+                                                                               
                <xsl:value-of select="php:function('lang', 'year')"/>
+                                                                               
        </option>
+                                                                               
        <xsl:apply-templates select="year_list/options"/>
+                                                                               
</select>
+                                                                       </td>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="periodization_data/id !=''">
                                                                                
        <td>
-                                                                               
                <select name="values[budget_year]">
+                                                                               
                <input type="checkbox" name="values[budget_periodization]" 
value="{periodization_data/id}" checked='checked'>
                                                                                
                        <xsl:attribute name="title">
-                                                                               
                                <xsl:value-of select="php:function('lang', 
'year')"/>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'periodization')"/>
+                                                                               
                                <xsl:text>::</xsl:text>
+                                                                               
                                <xsl:value-of 
select="periodization_data/descr"/>
                                                                                
                        </xsl:attribute>
-                                                                               
                        <option value="0">
-                                                                               
                                <xsl:value-of select="php:function('lang', 
'year')"/>
-                                                                               
                        </option>
-                                                                               
                        <xsl:apply-templates select="year_list/options"/>
-                                                                               
                </select>
+                                                                               
                </input>
                                                                                
        </td>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="periodization_data/id !=''">
-                                                                               
                        <td>
-                                                                               
                                <input type="checkbox" 
name="values[budget_periodization]" value="{periodization_data/id}" 
checked='checked'>
-                                                                               
                                        <xsl:attribute name="title">
-                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'periodization')"/>
-                                                                               
                                                <xsl:text>::</xsl:text>
-                                                                               
                                                <xsl:value-of 
select="periodization_data/descr"/>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </input>
-                                                                               
                        </td>
-                                                                               
                </xsl:when>
-                                                                               
        </xsl:choose>
-                                                                               
</tr>
-                                                                       </table>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               </tr>
+                                                       </table>
                                                </div>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'budget')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'budget')"/>
                                                </label>
                                                <div class="pure-custom">
                                                        <xsl:for-each 
select="datatable_def">
@@ -728,68 +735,68 @@
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="link_claim !=''">
-                                                                               
        <a href="{link_claim}">
-                                                                               
                <xsl:value-of select="lang_charge_tenant"/>
-                                                                               
        </a>
-                                                                               
</xsl:when>
-                                                                               
<xsl:otherwise>
-                                                                               
        <xsl:value-of select="lang_charge_tenant"/>
-                                                                               
</xsl:otherwise>
-                                                                       
</xsl:choose>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="link_claim !=''">
+                                                                       <a 
href="{link_claim}">
+                                                                               
<xsl:value-of select="lang_charge_tenant"/>
+                                                                       </a>
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       
<xsl:value-of select="lang_charge_tenant"/>
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
                                                </label>
-                                                                       <input 
type="checkbox" name="values[charge_tenant]" value="1">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="lang_charge_tenant_statustext"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:if test="charge_tenant = '1'">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                       </input>
+                                               <input type="checkbox" 
name="values[charge_tenant]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="lang_charge_tenant_statustext"/>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="charge_tenant = '1'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="lang_calculation"/>
+                                                       <xsl:value-of 
select="lang_calculation"/>
                                                </label>
                                                <xsl:value-of 
select="value_calculation"/>
                                                <xsl:text> </xsl:text> [ 
<xsl:value-of select="currency"/> ]
-                                                                       
<xsl:value-of select="lang_incl_tax"/>
+                                               <xsl:value-of 
select="lang_incl_tax"/>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'sum estimated cost')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'sum estimated cost')"/>
                                                </label>
                                                <xsl:value-of 
select="value_sum_estimated_cost"/>
                                                <xsl:text> </xsl:text> [ 
<xsl:value-of select="currency"/> ]
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'billable hours')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'billable hours')"/>
                                                </label>
                                                <input type="text" 
data-validation="number" data-validation-allowing="float" 
data-validation-decimal-separator="." id="values_billable_hour" 
name="values[billable_hours]" size="10" value="{value_billable_hours}">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter the billable hour for 
the task')"/>
-                                                                               
</xsl:attribute>
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'enter the billable hour for the task')"/>
+                                                       </xsl:attribute>
                                                        <xsl:attribute 
name="data-validation-optional">
                                                                
<xsl:text>true</xsl:text>
                                                        </xsl:attribute>
-                                                                       </input>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="value_workorder_id!='' and mode='edit'">
-                                                                               
        <xsl:variable name="lang_add_invoice_statustext">
-                                                                               
                <xsl:value-of select="php:function('lang', 'add invoice')"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <a href="javascript:showlightbox_manual_invoide({value_workorder_id})" 
title="{$lang_add_invoice_statustext}">
-                                                                               
                <xsl:value-of select="php:function('lang', 'add invoice')"/>
-                                                                               
        </a>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="value_workorder_id!='' and mode='edit'">
+                                                                       
<xsl:variable name="lang_add_invoice_statustext">
+                                                                               
<xsl:value-of select="php:function('lang', 'add invoice')"/>
+                                                                       
</xsl:variable>
+                                                                       <a 
href="javascript:showlightbox_manual_invoide({value_workorder_id})" 
title="{$lang_add_invoice_statustext}">
+                                                                               
<xsl:value-of select="php:function('lang', 'add invoice')"/>
+                                                                       </a>
+                                                               </xsl:when>
+                                                       </xsl:choose>
                                                </label>
                                                <div class="pure-custom">
                                                        <xsl:for-each 
select="datatable_def">
@@ -807,28 +814,28 @@
                                                </div>
                                        </div>
                                </fieldset>
-                                       </div>
-                                       <div id="coordination">
+                       </div>
+                       <div id="coordination">
                                <fieldset>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="mode='edit'">
+                                       <xsl:choose>
+                                               <xsl:when test="mode='edit'">
                                                        <div 
class="pure-control-group">
-                                                                       
<xsl:variable name="lang_contact_statustext">
-                                                                               
<xsl:value-of select="php:function('lang', 'click this link to select')"/>
-                                                                       
</xsl:variable>
+                                                               <xsl:variable 
name="lang_contact_statustext">
+                                                                       
<xsl:value-of select="php:function('lang', 'click this link to select')"/>
+                                                               </xsl:variable>
                                                                <label 
for="name">
-                                                                               
        <a href="javascript:notify_contact_lookup()" 
title="{$lang_contact_statustext}">
-                                                                               
                <xsl:value-of select="php:function('lang', 'contact')"/>
-                                                                               
        </a>
+                                                                       <a 
href="javascript:notify_contact_lookup()" title="{$lang_contact_statustext}">
+                                                                               
<xsl:value-of select="php:function('lang', 'contact')"/>
+                                                                       </a>
                                                                </label>
-                                                                               
                                <input type="hidden" id="notify_contact" 
name="notify_contact" value=""/>
-                                                                               
                                <input type="hidden" name="notify_contact_name" 
value=""/>
+                                                               <input 
type="hidden" id="notify_contact" name="notify_contact" value=""/>
+                                                               <input 
type="hidden" name="notify_contact_name" value=""/>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                        <div class="pure-control-group">
                                                <label for="name">
-                                                                       
<xsl:value-of select="php:function('lang', 'notify')"/>
+                                                       <xsl:value-of 
select="php:function('lang', 'notify')"/>
                                                </label>
                                                <div class="pure-custom">
                                                        <xsl:for-each 
select="datatable_def">
@@ -845,59 +852,59 @@
                                                        </xsl:for-each>
                                                </div>
                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="suppresscoordination =''">
+                                       <xsl:choose>
+                                               <xsl:when 
test="suppresscoordination =''">
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_key_fetch"/>
+                                                                       
<xsl:value-of select="lang_key_fetch"/>
                                                                </label>
-                                                                               
        <xsl:variable name="lang_key_fetch_statustext">
-                                                                               
                <xsl:value-of select="lang_key_fetch_statustext"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <select name="values[key_fetch]" class="forms" 
onMouseover="window.status='{$lang_key_fetch_statustext}'; return true;">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="lang_no_key_fetch"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="key_fetch_list"/>
-                                                                               
        </select>
+                                                               <xsl:variable 
name="lang_key_fetch_statustext">
+                                                                       
<xsl:value-of select="lang_key_fetch_statustext"/>
+                                                               </xsl:variable>
+                                                               <select 
name="values[key_fetch]" class="forms" 
onMouseover="window.status='{$lang_key_fetch_statustext}'; return true;">
+                                                                       <option 
value="">
+                                                                               
<xsl:value-of select="lang_no_key_fetch"/>
+                                                                       
</option>
+                                                                       
<xsl:apply-templates select="key_fetch_list"/>
+                                                               </select>
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_key_deliver"/>
+                                                                       
<xsl:value-of select="lang_key_deliver"/>
                                                                </label>
-                                                                               
        <xsl:variable name="lang_key_deliver_statustext">
-                                                                               
                <xsl:value-of select="lang_key_deliver_statustext"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <select name="values[key_deliver]" class="forms" 
onMouseover="window.status='{$lang_key_deliver_statustext}'; return true;">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="lang_no_key_deliver"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="key_deliver_list"/>
-                                                                               
        </select>
+                                                               <xsl:variable 
name="lang_key_deliver_statustext">
+                                                                       
<xsl:value-of select="lang_key_deliver_statustext"/>
+                                                               </xsl:variable>
+                                                               <select 
name="values[key_deliver]" class="forms" 
onMouseover="window.status='{$lang_key_deliver_statustext}'; return true;">
+                                                                       <option 
value="">
+                                                                               
<xsl:value-of select="lang_no_key_deliver"/>
+                                                                       
</option>
+                                                                       
<xsl:apply-templates select="key_deliver_list"/>
+                                                               </select>
                                                        </div>
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="lang_key_responsible"/>
+                                                                       
<xsl:value-of select="lang_key_responsible"/>
                                                                </label>
-                                                                               
        <xsl:for-each select="key_responsible_list">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="selected">
-                                                                               
                                <xsl:value-of select="name"/>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </xsl:for-each>
+                                                               <xsl:for-each 
select="key_responsible_list">
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="selected">
+                                                                               
        <xsl:value-of select="name"/>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
+                                                               </xsl:for-each>
                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                               </xsl:when>
+                                       </xsl:choose>
                                </fieldset>
-                                       </div>
-                                       <xsl:choose>
-                                               <xsl:when 
test="value_workorder_id!=''">
-                                                       <div id="documents">
+                       </div>
+                       <xsl:choose>
+                               <xsl:when test="value_workorder_id!=''">
+                                       <div id="documents">
                                                <fieldset>
                                                        <div 
class="pure-control-group">
                                                                <label 
for="name">
-                                                                               
        <xsl:value-of select="//lang_files"/>
+                                                                       
<xsl:value-of select="//lang_files"/>
                                                                </label>
                                                                <div 
class="pure-custom">
                                                                        
<xsl:for-each select="datatable_def">
@@ -914,10 +921,10 @@
                                                                        
</xsl:for-each>
                                                                </div>
                                                        </div>
-                                                                       
<xsl:call-template name="file_upload"/>
+                                                       <xsl:call-template 
name="file_upload"/>
                                                </fieldset>
-                                                       </div>
-                                                       <div id="history">
+                                       </div>
+                                       <div id="history">
                                                <fieldset>
                                                        <div 
class="pure-control-group">
                                                                <xsl:for-each 
select="datatable_def">
@@ -934,35 +941,35 @@
                                                                </xsl:for-each>
                                                        </div>
                                                </fieldset>
-                                                       </div>
-                                               </xsl:when>
-                                       </xsl:choose>
-                                       <script type="text/javascript">
-                                               var base_java_url = 
<xsl:value-of select="base_java_url"/>;
-                                               var base_java_notify_url = 
<xsl:value-of select="base_java_notify_url"/>;
-                                       </script>
-                               </div>
+                                       </div>
+                               </xsl:when>
+                       </xsl:choose>
+                       <script type="text/javascript">
+                               var lang = <xsl:value-of 
select="php:function('js_lang', 'please enter either a budget or contrakt 
sum')"/>;
+                               var check_for_budget = <xsl:value-of 
select="check_for_budget"/>;
+                       </script>
+               </div>
                <div class="proplist-col">
                        <xsl:choose>
                                <xsl:when test="mode='edit'">
-                                                               <input 
type="hidden" name="values[save]" value="1"/>
+                                       <input type="hidden" 
name="values[save]" value="1"/>
                                        <input type="submit" class="pure-button 
pure-button-primary" name="save" value="{$lang_save}">
-                                                                       
<xsl:attribute name="title">
-                                                                               
<xsl:value-of select="lang_save_statustext"/>
-                                                                       
</xsl:attribute>
-                                                               </input>
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="lang_save_statustext"/>
+                                               </xsl:attribute>
+                                       </input>
                                </xsl:when>
-                                       <xsl:when test="mode='view'">
-                                                       <xsl:variable 
name="lang_edit">
-                                                               <xsl:value-of 
select="lang_edit"/>
-                                                       </xsl:variable>
+                               <xsl:when test="mode='view'">
+                                       <xsl:variable name="lang_edit">
+                                               <xsl:value-of 
select="lang_edit"/>
+                                       </xsl:variable>
                                        <input type="button" class="pure-button 
pure-button-primary" name="edit" value="{$lang_edit}" 
onClick="document.edit_form.submit();">
-                                                                       
<xsl:attribute name="title">
-                                                                               
<xsl:value-of select="lang_edit_statustext"/>
-                                                                       
</xsl:attribute>
-                                                               </input>
-                                       </xsl:when>
-                               </xsl:choose>
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="lang_edit_statustext"/>
+                                               </xsl:attribute>
+                                       </input>
+                               </xsl:when>
+                       </xsl:choose>
                        <input type="button" class="pure-button 
pure-button-primary" name="done" value="{$lang_done}" 
onClick="document.done_form.submit();">
                                <xsl:attribute name="title">
                                        <xsl:value-of 
select="lang_done_statustext"/>
@@ -985,82 +992,82 @@
 
 <!-- New template-->
 <xsl:template match="key_fetch_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="key_deliver_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>
 
 <!-- add_invoice -->
 <xsl:template match="add_invoice" xmlns:php="http://php.net/xsl";>
-               <xsl:choose>
-                       <xsl:when test="normalize-space(redirect) != ''">
-                               <script>
-                                       window.parent.location = '<xsl:value-of 
select="redirect"/>';
-                                       window.close();
-                               </script>
-                       </xsl:when>
-               </xsl:choose>
+       <xsl:choose>
+               <xsl:when test="normalize-space(redirect) != ''">
+                       <script>
+                               window.parent.location = '<xsl:value-of 
select="redirect"/>';
+                               window.close();
+                       </script>
+               </xsl:when>
+       </xsl:choose>
 
-               <xsl:variable name="lang_datetitle">
-                       <xsl:value-of select="php:function('lang', 'Select 
date')"/>
-               </xsl:variable>
+       <xsl:variable name="lang_datetitle">
+               <xsl:value-of select="php:function('lang', 'Select date')"/>
+       </xsl:variable>
 
-               <script type="text/javascript">
-                       function window_close()
-                       {
-                               window.close();
-                       }
-               </script>
+       <script type="text/javascript">
+               function window_close()
+               {
+               window.close();
+               }
+       </script>
 
        <div>
                <dl>
                        <dt>
-                                               <xsl:value-of select="message"/>
+                               <xsl:value-of select="message"/>
                        </dt>
                </dl>
                <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:variable name="form_action">
-                                       <xsl:value-of select="form_action"/>
-                               </xsl:variable>
+               <xsl:variable name="form_action">
+                       <xsl:value-of select="form_action"/>
+               </xsl:variable>
                <form method="post" id="add_invoice" name="form" 
action="{$form_action}" class="pure-form pure-form-aligned">
                        <div id="tab-content">
                                <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
@@ -1069,205 +1076,205 @@
                                        <xsl:call-template 
name="b_account_form"/>
                                        <xsl:call-template 
name="project_group_form"/>
                                        <xsl:call-template name="ecodimb_form"/>
-                                               <xsl:call-template 
name="vendor_form"/>
+                                       <xsl:call-template name="vendor_form"/>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'janitor')"/>
                                                </label>
-                                                       <select 
name="values[janitor]" class="forms">
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="php:function('lang', 'no janitor')"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="janitor_list/options_lid"/>
-                                                       </select>
+                                               <select name="values[janitor]" 
class="forms">
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'no janitor')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="janitor_list/options_lid"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'supervisor')"/>
                                                </label>
-                                                       <select 
name="values[supervisor]" class="forms">
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="php:function('lang', 'no supervisor')"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="supervisor_list/options_lid"/>
-                                                       </select>
+                                               <select 
name="values[supervisor]" class="forms">
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'no supervisor')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="supervisor_list/options_lid"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'B - responsible')"/>
                                                </label>
-                                                       <select 
name="values[budget_responsible]" class="forms">
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="php:function('lang', 'Select B-Responsible')"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="budget_responsible_list/options_lid"/>
-                                                       </select>
+                                               <select 
name="values[budget_responsible]" class="forms">
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'Select B-Responsible')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="budget_responsible_list/options_lid"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'order id')"/>
                                                </label>
-                                                       <input type="text" 
name="values[order_id]" value="{value_order_id}" >
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'Order # that initiated the 
invoice')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
name="values[order_id]" value="{value_order_id}" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Order # that initiated the invoice')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'tax code')"/>
                                                </label>
-                                                       <select 
name="values[tax_code]" class="forms" >
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'tax code')"/>
-                                                               </xsl:attribute>
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="php:function('lang', 'select')"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="tax_code_list/options"/>
-                                                       </select>
+                                               <select name="values[tax_code]" 
class="forms" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'tax code')"/>
+                                                       </xsl:attribute>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'select')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="tax_code_list/options"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'art')"/>
                                                </label>
-                                                       <select 
name="values[artid]" class="forms" >
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'You have to select type of 
invoice')"/>
-                                                               </xsl:attribute>
-                                                               <option 
value="">
-                                                                       
<xsl:value-of select="php:function('lang', 'Select Invoice Type')"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="art_list/options"/>
-                                                       </select>
+                                               <select name="values[artid]" 
class="forms" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'You have to select type of invoice')"/>
+                                                       </xsl:attribute>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'Select Invoice Type')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="art_list/options"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'Type invoice II')"/>
                                                </label>
-                                                       <select 
name="values[typeid]" class="forms">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'Select the type  invoice. To do not 
use type -  select NO TYPE')"/>
-                                                               </xsl:attribute>
-                                                               <option 
value="">
-                                                       <xsl:value-of 
select="php:function('lang', 'No type')"/>
-                                                               </option>
-                                                               
<xsl:apply-templates select="type_list/options"/>
-                                                       </select>
+                                               <select name="values[typeid]" 
class="forms">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Select the type  invoice. To do not use type -  
select NO TYPE')"/>
+                                                       </xsl:attribute>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'No type')"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="type_list/options"/>
+                                               </select>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'voucher id')"/>
                                                </label>
-                                                       <input type="text" 
name="values[voucher_out_id]" value="{value_voucher_out_id}">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'voucher id')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
name="values[voucher_out_id]" value="{value_voucher_out_id}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'voucher id')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'Invoice Number')"/>
                                                </label>
-                                                       <input type="text" 
name="values[invoice_id]" value="{value_invoice_id}">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'Enter Invoice Number')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
name="values[invoice_id]" value="{value_invoice_id}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Enter Invoice Number')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'KID nr')"/>
                                                </label>
-                                                       <input type="text" 
name="values[kidnr]" value="{value_kidnr}" >
-                                                               <xsl:attribute 
name="title">
-                                                       <xsl:value-of 
select="php:function('lang', 'Enter Kid nr')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
name="values[kidnr]" value="{value_kidnr}" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Enter Kid nr')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'amount')"/>
                                                </label>
-                                                       <input type="text" 
name="values[amount]" value="{value_amount}">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'amount of the invoice')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
name="values[amount]" value="{value_amount}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'amount of the invoice')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'invoice date')"/>
                                                </label>
-                                                       <input type="text" 
id="invoice_date" name="values[invoice_date]" size="10" 
value="{value_invoice_date}" readonly="readonly" >
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'Enter the invoice date')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
id="invoice_date" name="values[invoice_date]" size="10" 
value="{value_invoice_date}" readonly="readonly" >
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'Enter the invoice date')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'payment date')"/>
                                                </label>
-                                                       <input type="text" 
id="payment_date" name="values[payment_date]" size="10" 
value="{value_payment_date}" readonly="readonly">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'payment date')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
id="payment_date" name="values[payment_date]" size="10" 
value="{value_payment_date}" readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'payment date')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'paid')"/>
                                                </label>
-                                                       <input type="text" 
id="paid_date" name="values[paid_date]" size="10" value="{value_paid_date}" 
readonly="readonly">
-                                                               <xsl:attribute 
name="title">
-                                                                       
<xsl:value-of select="php:function('lang', 'paid')"/>
-                                                               </xsl:attribute>
-                                                       </input>
+                                               <input type="text" 
id="paid_date" name="values[paid_date]" size="10" value="{value_paid_date}" 
readonly="readonly">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'paid')"/>
+                                                       </xsl:attribute>
+                                               </input>
                                        </div>
                                        <div class="pure-control-group">
                                                <label>
                                                        <xsl:value-of 
select="php:function('lang', 'remark')"/>
                                                </label>
-                                                       <textarea cols="60" 
rows="10" name="values[merknad]">
-                                                               <xsl:value-of 
select="value_merknad"/>
-                                                       </textarea>
+                                               <textarea cols="60" rows="10" 
name="values[merknad]">
+                                                       <xsl:value-of 
select="value_merknad"/>
+                                               </textarea>
                                        </div>
                                </div>
                        </div>
                        <div class="pure-control-group">
-                                                       <xsl:variable 
name="lang_add">
-                                                               <xsl:value-of 
select="php:function('lang', 'add')"/>
-                                                       </xsl:variable>
+                               <xsl:variable name="lang_add">
+                                       <xsl:value-of 
select="php:function('lang', 'add')"/>
+                               </xsl:variable>
                                <input type="submit" class="pure-button 
pure-button-primary" name="add" value="{$lang_add}" title='{$lang_add}'>
-                                                       </input>
-                                                       <xsl:variable 
name="cancel_action">
-                                                               <xsl:value-of 
select="cancel_action"/>
-                                                       </xsl:variable>
+                               </input>
+                               <xsl:variable name="cancel_action">
+                                       <xsl:value-of select="cancel_action"/>
+                               </xsl:variable>
                        </div>
-                               </form>
-               </div>
+               </form>
+       </div>
 </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>
+       <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>
 
 <!-- New template-->
 <xsl:template match="options_lid">
-               <option value="{lid}">
-                       <xsl:if test="selected = 'selected'">
-                               <xsl:attribute name="selected" 
value="selected"/>
-                       </xsl:if>
-                       <xsl:value-of disable-output-escaping="yes" 
select="lastname"/>
-                       <xsl:text>, </xsl:text>
-                       <xsl:value-of disable-output-escaping="yes" 
select="firstname"/>
-               </option>
+       <option value="{lid}">
+               <xsl:if test="selected = 'selected'">
+                       <xsl:attribute name="selected" value="selected"/>
+               </xsl:if>
+               <xsl:value-of disable-output-escaping="yes" select="lastname"/>
+               <xsl:text>, </xsl:text>
+               <xsl:value-of disable-output-escaping="yes" select="firstname"/>
+       </option>
 </xsl:template>
 




reply via email to

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