fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14923] Merge 14920:14922 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [14923] Merge 14920:14922 from trunk
Date: Mon, 18 Apr 2016 13:15:47 +0000

Revision: 14923
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14923
Author:   sigurdne
Date:     2016-04-18 13:15:47 +0000 (Mon, 18 Apr 2016)
Log Message:
-----------
Merge 14920:14922 from trunk

Modified Paths:
--------------
    branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php
    branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
    branches/Version-2_0-branch/property/inc/class.uientity.inc.php
    branches/Version-2_0-branch/property/templates/base/attributes_form.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-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919
   + /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,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922

Modified: branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php        
2016-04-18 13:12:39 UTC (rev 14922)
+++ branches/Version-2_0-branch/phpgwapi/inc/class.custom_fields.inc.php        
2016-04-18 13:15:47 UTC (rev 14923)
@@ -1170,7 +1170,8 @@
                                        'get_single_function'           => 
$this->_db->f('get_single_function'),
                                        'get_single_function_input' => 
$this->_db->f('get_single_function_input') ? 
unserialize($this->_db->f('get_single_function_input', true)) : '',
                                        'short_description'                     
=> $this->_db->f('short_description'),
-                                       'javascript_action'                     
=>$this->_db->f('javascript_action',true),
+                                       'javascript_action'                     
=> $this->_db->f('javascript_action',true),
+                                       'default_value'                         
=> $this->_db->f('default_value',true)
                                );
                        }
 

Modified: 
branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl
===================================================================
--- branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2016-04-18 13:12:39 UTC (rev 14922)
+++ branches/Version-2_0-branch/phpgwapi/templates/base/datatable_jquery.xsl    
2016-04-18 13:15:47 UTC (rev 14923)
@@ -975,7 +975,7 @@
                                        var temp = {};
                                        temp[menuaction] = {}
                                        oControls.each(function() {
-                                               if ( $(this).attr('name') )
+                                               if ( $(this).attr('name') && 
$(this).val() != null)
                                                {
                                                        sValue[ 
$(this).attr('name') ] = $(this).val().replace('"', '"');
                                                        temp[ 
$(this).attr('name') ] = $(this).val().replace('"', '"');
@@ -1045,7 +1045,8 @@
 //                                     console.log(oControls);
                                        oControls.each(function()
                                        {
-                                               if ( $(this).attr('name') )
+//                                             if ( $(this).attr('name') )
+                                               if ( $(this).attr('name') && 
$(this).val() != null)
                                                {
                                                        value = 
$(this).val().replace('"', '"');
                                                        aoData[ 
$(this).attr('name') ] = value;

Modified: branches/Version-2_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.uientity.inc.php     
2016-04-18 13:12:39 UTC (rev 14922)
+++ branches/Version-2_0-branch/property/inc/class.uientity.inc.php     
2016-04-18 13:15:47 UTC (rev 14923)
@@ -252,7 +252,7 @@
 
                        foreach ($data as $key => $original_value)
                        {
-                               if ((!isset($values['attributes']) || 
!$values['attributes']) && $data[$key])
+                               if ((!isset($values[$key]) || !$values[$key]) 
&& $data[$key])
                                {
                                        $values[$key] = $original_value;
                                }

Modified: 
branches/Version-2_0-branch/property/templates/base/attributes_form.xsl
===================================================================
--- branches/Version-2_0-branch/property/templates/base/attributes_form.xsl     
2016-04-18 13:12:39 UTC (rev 14922)
+++ branches/Version-2_0-branch/property/templates/base/attributes_form.xsl     
2016-04-18 13:15:47 UTC (rev 14923)
@@ -18,9 +18,9 @@
        <xsl:variable name="lang_min">
                <xsl:value-of select="php:function('lang', 'minute')" />
        </xsl:variable>
-               <xsl:variable name="statustext">
-                       <xsl:value-of select="statustext"/>
-               </xsl:variable>
+       <xsl:variable name="statustext">
+               <xsl:value-of select="statustext"/>
+       </xsl:variable>
 
        <xsl:variable name="textareacols">
                <xsl:value-of select="php:function('get_phpgw_info', 
'user|preferences|property|textareacols')" />
@@ -62,321 +62,321 @@
        <xsl:param name="textareacols" />
        <xsl:param name="textarearows" />
 
-               <xsl:choose>
-                       <xsl:when test="datatype='section'">
+       <xsl:choose>
+               <xsl:when test="datatype='section'">
                        <div class="pure-control-group">
-                                               <xsl:value-of select="descr" 
disable-output-escaping="yes"/>                            
+                               <xsl:value-of select="descr" 
disable-output-escaping="yes"/>
                        </div>
+               </xsl:when>
+       </xsl:choose>
+
+       <div class="pure-control-group">
+               <xsl:choose>
+                       <xsl:when test="not(hide_row)">
+                               <label>
+                                       <xsl:choose>
+                                               <xsl:when test="helpmsg=1">
+                                                       <xsl:variable 
name="help_url">
+                                                               <xsl:value-of 
select="help_url"/>
+                                                       </xsl:variable>
+                                                       <a 
href="javascript:help_Popup('{$help_url}');">
+                                                               
<xsl:text>[</xsl:text>
+                                                               <xsl:value-of 
select="input_text"/>
+                                                               
<xsl:text>]</xsl:text>
+                                                       </a>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <xsl:value-of 
select="input_text"/>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="datatype='pwd'">
+                                                       <br/>
+                                                       <xsl:text>[ </xsl:text>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="value!=''">
+                                                                       
<xsl:value-of select="php:function('lang', 'edit')"/>
+                                                               </xsl:when>
+                                                               <xsl:otherwise>
+                                                                       
<xsl:value-of select="php:function('lang', 'add')"/>
+                                                               </xsl:otherwise>
+                                                       </xsl:choose>
+                                                       <xsl:text> ]</xsl:text>
+                                               </xsl:when>
+                                       </xsl:choose>
+                               </label>
                        </xsl:when>
                </xsl:choose>
 
-       <div class="pure-control-group">
-                       <xsl:choose>
-                               <xsl:when test="not(hide_row)">
-                                               <label>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="helpmsg=1">
-                                                               <xsl:variable 
name="help_url">
-                                                                       
<xsl:value-of select="help_url"/>
+               <xsl:choose>
+                       <xsl:when test="name!=''">
+                               <input type="hidden" 
name="values_attribute[{counter}][name]" value="{name}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][datatype]" value="{datatype}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][precision]" value="{precision}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][history]" value="{history}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][attrib_id]" value="{id}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][nullable]" value="{nullable}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][input_text]" value="{input_text}"/>
+                               <input type="hidden" 
name="values_attribute[{counter}][disabled]" value="{disabled}"/>
+                               <xsl:choose>
+                                       <xsl:when test="datatype='R'">
+                                               <xsl:call-template 
name="choice"/>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='CH'">
+                                               <xsl:call-template 
name="choice"/>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='LB'">
+                                               <select id="id_{name}" 
name="values_attribute[{counter}][value]" title="{$statustext}">
+                                                       <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>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'select')"/>
+                                                       </option>
+                                                       <xsl:for-each 
select="choice">
+                                                               <xsl:variable 
name="id">
+                                                                       
<xsl:value-of select="id"/>
                                                                </xsl:variable>
-                                                       <a 
href="javascript:help_Popup('{$help_url}');">
-                                                                       
<xsl:text>[</xsl:text>
-                                                                       
<xsl:value-of select="input_text"/>
-                                                                       
<xsl:text>]</xsl:text>
-                                                               </a>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <xsl:value-of 
select="input_text"/>
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="datatype='pwd'">
-                                                               <br/>
-                                                               <xsl:text>[ 
</xsl:text>
                                                                <xsl:choose>
-                                                                       
<xsl:when test="value!=''">
-                                                                               
<xsl:value-of select="php:function('lang', 'edit')"/>
+                                                                       
<xsl:when test="checked='checked'">
+                                                                               
<option value="{$id}" selected="selected">
+                                                                               
        <xsl:value-of disable-output-escaping="yes" select="value"/>
+                                                                               
</option>
                                                                        
</xsl:when>
                                                                        
<xsl:otherwise>
-                                                                               
<xsl:value-of select="php:function('lang', 'add')"/>
+                                                                               
<option value="{$id}">
+                                                                               
        <xsl:value-of disable-output-escaping="yes" select="value"/>
+                                                                               
</option>
                                                                        
</xsl:otherwise>
                                                                </xsl:choose>
-                                                               <xsl:text> 
]</xsl:text>
+                                                       </xsl:for-each>
+                                               </select>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='AB'">
+                                               <xsl:variable 
name="contact_name">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_name</xsl:text>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lookup_function">
+                                                       
<xsl:text>lookup_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="clear_function">
+                                                       
<xsl:text>clear_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
+                                               <input type="hidden" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="5">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                               <input size="30" type="text" 
name="{$contact_name}" value="{contact_name}" onClick="{$lookup_function}" 
readonly="readonly">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                               <input type="checkbox" 
name="clear_{name}_box" onClick="{$clear_function}">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'delete')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="readonly">
+                                                               
<xsl:text>readonly</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="contact_tel!=''">
+                                                               <xsl:value-of 
select="contact_tel"/>
                                                        </xsl:when>
                                                </xsl:choose>
-                                               </label>
-                               </xsl:when>
-                       </xsl:choose>
-
-                               <xsl:choose>
-                                       <xsl:when test="name!=''">
-                                               <input type="hidden" 
name="values_attribute[{counter}][name]" value="{name}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][datatype]" value="{datatype}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][precision]" value="{precision}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][history]" value="{history}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][attrib_id]" value="{id}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][nullable]" value="{nullable}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][input_text]" value="{input_text}"/>
-                                               <input type="hidden" 
name="values_attribute[{counter}][disabled]" value="{disabled}"/>
                                                <xsl:choose>
-                                                       <xsl:when 
test="datatype='R'">
-                                                               
<xsl:call-template name="choice"/>
+                                                       <xsl:when 
test="contact_email!=''">
+                                                               <a 
href="mailto:{contact_email}";>
+                                                                       
<xsl:value-of select="contact_email"/>
+                                                               </a>
                                                        </xsl:when>
-                                                       <xsl:when 
test="datatype='CH'">
-                                                               
<xsl:call-template name="choice"/>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='LB'">
-                                               <select id="id_{name}" 
name="values_attribute[{counter}][value]" title="{$statustext}">
-                                                                       
<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:choose>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='ABO'">
+                                               <xsl:variable name="org_name">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_name</xsl:text>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lookup_function">
+                                                       
<xsl:text>lookup_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
+                                               <input type="hidden" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="5">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
                                                                        
</xsl:attribute>
                                                                </xsl:when>
-                                                                       
</xsl:choose>
-                                                                       <option 
value="">
-                                                                               
<xsl:value-of select="php:function('lang', 'select')"/>
-                                                                       
</option>
-                                                                       
<xsl:for-each select="choice">
-                                                                               
<xsl:variable name="id">
-                                                                               
        <xsl:value-of select="id"/>
-                                                                               
</xsl:variable>
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="checked='checked'">
-                                                                               
                <option value="{$id}" selected="selected">
-                                                                               
                        <xsl:value-of disable-output-escaping="yes" 
select="value"/>
-                                                                               
                </option>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:otherwise>
-                                                                               
                <option value="{$id}">
-                                                                               
                        <xsl:value-of disable-output-escaping="yes" 
select="value"/>
-                                                                               
                </option>
-                                                                               
        </xsl:otherwise>
-                                                                               
</xsl:choose>
-                                                                       
</xsl:for-each>
-                                                               </select>
+                                                       </xsl:choose>
+                                               </input>
+                                               <input size="30" type="text" 
name="{$org_name}" value="{org_name}" onClick="{$lookup_function}" 
readonly="readonly">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="org_tel!=''">
+                                                               <xsl:value-of 
select="org_tel"/>
                                                        </xsl:when>
-                                                       <xsl:when 
test="datatype='AB'">
-                                                                               
        <xsl:variable name="contact_name">
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
                <xsl:text>_name</xsl:text>
-                                                                               
        </xsl:variable>
-                                                                               
        <xsl:variable name="lookup_function">
-                                                                               
                <xsl:text>lookup_</xsl:text>
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
                <xsl:text>();</xsl:text>
-                                                                               
        </xsl:variable>
-                                                                               
        <xsl:variable name="clear_function">
-                                                                               
                <xsl:text>clear_</xsl:text>
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
                <xsl:text>();</xsl:text>
-                                                                               
        </xsl:variable>
-                                                                               
        <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
        <input size="30" type="text" name="{$contact_name}" 
value="{contact_name}" onClick="{$lookup_function}" readonly="readonly">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
        <input type="checkbox" name="clear_{name}_box" 
onClick="{$clear_function}">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'delete')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:attribute name="readonly">
-                                                                               
                        <xsl:text>readonly</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="contact_tel!=''">
-                                                                               
                        <xsl:value-of select="contact_tel"/>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="contact_email!=''">
-                                                                               
                        <a href="mailto:{contact_email}";>
-                                                                               
                                <xsl:value-of select="contact_email"/>
-                                                                               
                        </a>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
+                                               </xsl:choose>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="org_email!=''">
+                                                               <a 
href="mailto:{org_email}";>
+                                                                       
<xsl:value-of select="org_email"/>
+                                                               </a>
                                                        </xsl:when>
-                                                       <xsl:when 
test="datatype='ABO'">
-                                                                               
        <xsl:variable name="org_name">
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
                <xsl:text>_name</xsl:text>
-                                                                               
        </xsl:variable>
-                                                                               
        <xsl:variable name="lookup_function">
-                                                                               
                <xsl:text>lookup_</xsl:text>
-                                                                               
                <xsl:value-of select="name"/>
-                                                                               
                <xsl:text>();</xsl:text>
-                                                                               
        </xsl:variable>
-                                                                               
        <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
        <input size="30" type="text" name="{$org_name}" value="{org_name}" 
onClick="{$lookup_function}" readonly="readonly">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="org_tel!=''">
-                                                                               
                        <xsl:value-of select="org_tel"/>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="org_email!=''">
-                                                                               
                        <a href="mailto:{org_email}";>
-                                                                               
                                <xsl:value-of select="org_email"/>
-                                                                               
                        </a>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='VENDOR'">
-                                                               <xsl:variable 
name="vendor_name">
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>_org_name</xsl:text>
-                                                               </xsl:variable>
-                                                               <xsl:variable 
name="lookup_function">
-                                                                       
<xsl:text>lookup_</xsl:text>
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>();</xsl:text>
-                                                               </xsl:variable>
+                                               </xsl:choose>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='VENDOR'">
+                                               <xsl:variable 
name="vendor_name">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_org_name</xsl:text>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lookup_function">
+                                                       
<xsl:text>lookup_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
                                                <input type="text" id="{name}" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                       <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>
+                                               </input>
                                                <input size="30" type="text" 
id="{$vendor_name}" name="{$vendor_name}" value="{vendor_name}" 
onClick="{$lookup_function}" readonly="readonly">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </input>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='custom1'">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='custom1'">
                                                <select 
name="values_attribute[{counter}][value]">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                       <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>
-                                                                       <option 
value="">
-                                                                               
<xsl:value-of select="php:function('lang', 'select')"/>
-                                                                       
</option>
-                                                                       
<xsl:for-each select="choice">
-                                                                               
<xsl:variable name="id">
-                                                                               
        <xsl:value-of select="id"/>
-                                                                               
</xsl:variable>
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="selected='1'">
-                                                                               
                <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:for-each>
-                                                               </select>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='custom2'">
-                                                               <xsl:variable 
name="custom_name">
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>_name</xsl:text>
+                                                       </xsl:choose>
+                                                       <option value="">
+                                                               <xsl:value-of 
select="php:function('lang', 'select')"/>
+                                                       </option>
+                                                       <xsl:for-each 
select="choice">
+                                                               <xsl:variable 
name="id">
+                                                                       
<xsl:value-of select="id"/>
                                                                </xsl:variable>
-                                                               <xsl:variable 
name="lookup_function">
-                                                                       
<xsl:text>lookup_</xsl:text>
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>();</xsl:text>
-                                                               </xsl:variable>
-                                                               <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="selected='1'">
+                                                                               
<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:for-each>
+                                               </select>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='custom2'">
+                                               <xsl:variable 
name="custom_name">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_name</xsl:text>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lookup_function">
+                                                       
<xsl:text>lookup_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
+                                               <input type="text" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6">
+                                                       <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>
-                                                               <input 
size="30" type="text" name="{$custom_name}" value="{custom_name}" 
onClick="{$lookup_function}" readonly="readonly">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </input>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='custom3'">
-                                                               <xsl:variable 
name="custom_id">
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>_id</xsl:text>
-                                                               </xsl:variable>
+                                                       </xsl:choose>
+                                               </input>
+                                               <input size="30" type="text" 
name="{$custom_name}" value="{custom_name}" onClick="{$lookup_function}" 
readonly="readonly">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='custom3'">
+                                               <xsl:variable name="custom_id">
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>_id</xsl:text>
+                                               </xsl:variable>
 
-                                                               <xsl:variable 
name="custom_name">
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>_name</xsl:text>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="custom_name">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_name</xsl:text>
+                                               </xsl:variable>
 
-                                                               <xsl:variable 
name="custom_container">
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>_container</xsl:text>
-                                                               </xsl:variable>
+                                               <xsl:variable 
name="custom_container">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_container</xsl:text>
+                                               </xsl:variable>
 
-                                               <input id="{$custom_id}" 
name="values_attribute[{counter}][value]" type="hidden" value="{value}">
+                                               <input id="{$custom_id}" 
name="values_attribute[{counter}][value]" type="hidden" value="{value}">
                                                        <xsl:choose>
                                                                <xsl:when 
test="nullable!='1'">
                                                                        
<xsl:attribute name="data-validation">
@@ -384,284 +384,284 @@
                                                                        
</xsl:attribute>
                                                                </xsl:when>
                                                        </xsl:choose>
-                                               </input>
-                                               <input id="{$custom_name}" 
name="{$custom_name}" type="text" value="{custom_name}">
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="disabled!=''">
-                                                                               
                <xsl:attribute name="disabled">
-                                                                               
                        <xsl:text> disabled</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
        </xsl:when>
-                                                                               
</xsl:choose>
-                                                                       </input>
-                                                                       <div 
id="{$custom_container}"/>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='user'">
-                                                               <xsl:variable 
name="user_name">
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>_user_name</xsl:text>
-                                                               </xsl:variable>
-                                                               <xsl:variable 
name="lookup_function">
-                                                                       
<xsl:text>lookup_</xsl:text>
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>();</xsl:text>
-                                                               </xsl:variable>
+                                               </input>
+                                               <input id="{$custom_name}" 
name="{$custom_name}" type="text" value="{custom_name}">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                               <div id="{$custom_container}"/>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='user'">
+                                               <xsl:variable name="user_name">
+                                                       <xsl:value-of 
select="name"/>
+                                                       
<xsl:text>_user_name</xsl:text>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lookup_function">
+                                                       
<xsl:text>lookup_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
                                                <input type="text" id="{name}" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                       <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>
+                                               </input>
                                                <input size="30" type="text" 
id="{$user_name}" name="{$user_name}" value="{user_name}" 
onClick="{$lookup_function}" readonly="readonly">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </input>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='D'">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='D'">
                                                <input data-validation="date" 
data-validation-format="dd/mm/yyyy" type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}" size="12" 
maxlength="12">
-                                                                       
<xsl:attribute name="readonly">
-                                                                               
<xsl:text> readonly</xsl:text>
+                                                       <xsl:attribute 
name="readonly">
+                                                               <xsl:text> 
readonly</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
                                                                        
</xsl:attribute>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                               </xsl:when>
                                                                <xsl:when 
test="nullable='1'">
                                                                        
<xsl:attribute name="data-validation-optional">
                                                                                
<xsl:text>true</xsl:text>
                                                                        
</xsl:attribute>
                                                                </xsl:when>
-                                                                       
</xsl:choose>
-                                                               </input>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='DT'">
-                                                               <xsl:variable 
name="clear_function">
-                                                                       
<xsl:text>clear_</xsl:text>
-                                                                       
<xsl:value-of select="name"/>
-                                                                       
<xsl:text>();</xsl:text>
-                                                               </xsl:variable>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='DT'">
+                                               <xsl:variable 
name="clear_function">
+                                                       
<xsl:text>clear_</xsl:text>
+                                                       <xsl:value-of 
select="name"/>
+                                                       <xsl:text>();</xsl:text>
+                                               </xsl:variable>
 
-                                                               <table>
-                                                                       <tr>
-                                                                               
<td>
-                                                                               
        <input type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value][date]" value="{value/date}" size="12" 
maxlength="12">
-                                                                               
                <xsl:attribute name="readonly">
-                                                                               
                        <xsl:text> readonly</xsl:text>
+                                               <table>
+                                                       <tr>
+                                                               <td>
+                                                                       <input 
type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value][date]" value="{value/date}" size="12" 
maxlength="12">
+                                                                               
<xsl:attribute name="readonly">
+                                                                               
        <xsl:text> readonly</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="disabled!=''">
+                                                                               
                <xsl:attribute name="disabled">
+                                                                               
                        <xsl:text> disabled</xsl:text>
                                                                                
                </xsl:attribute>
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
+                                                                               
        </xsl:when>
                                                                                
        <xsl:when test="nullable!='1'">
                                                                                
                <xsl:attribute name="data-validation">
                                                                                
                        <xsl:text>required</xsl:text>
                                                                                
                </xsl:attribute>
                                                                                
        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <input type="text" id="values_attribute_{counter}_hour" 
name="values_attribute[{counter}][value][hour]" value="{value/hour}" size="2" 
maxlength="2" title="{$lang_hour}">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <xsl:text> : </xsl:text>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <input type="text" id="values_attribute_{counter}_min" 
name="values_attribute[{counter}][value][min]" value="{value/min}" size="2" 
maxlength="2" title="{$lang_min}">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <input type="checkbox" name="clear_{name}_box" 
onClick="{$clear_function}">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'delete')"/>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_attribute_{counter}_hour" 
name="values_attribute[{counter}][value][hour]" value="{value/hour}" size="2" 
maxlength="2" title="{$lang_hour}">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="disabled!=''">
+                                                                               
                <xsl:attribute name="disabled">
+                                                                               
                        <xsl:text> disabled</xsl:text>
                                                                                
                </xsl:attribute>
-                                                                               
                <xsl:attribute name="readonly">
-                                                                               
                        <xsl:text>readonly</xsl:text>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:text> : </xsl:text>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="text" id="values_attribute_{counter}_min" 
name="values_attribute[{counter}][value][min]" value="{value/min}" size="2" 
maxlength="2" title="{$lang_min}">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="disabled!=''">
+                                                                               
                <xsl:attribute name="disabled">
+                                                                               
                        <xsl:text> disabled</xsl:text>
                                                                                
                </xsl:attribute>
-                                                                               
        </input>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                               </td>
+                                                               <td>
+                                                                       <input 
type="checkbox" name="clear_{name}_box" onClick="{$clear_function}">
+                                                                               
<xsl:attribute name="title">
+                                                                               
        <xsl:value-of select="php:function('lang', 'delete')"/>
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:attribute name="readonly">
+                                                                               
        <xsl:text>readonly</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       </input>
 
-                                                                               
</td>
-                                                                       </tr>
-                                                               </table>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='T'">
-                                                               <textarea 
id="id_{name}"  name="values_attribute[{counter}][value]">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                               </td>
+                                                       </tr>
+                                               </table>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='T'">
+                                               <textarea id="id_{name}"  
name="values_attribute[{counter}][value]">
+                                                       <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>
-                                                                       
<xsl:attribute name="cols">
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="$textareacols!=''">
-                                                                               
                <xsl:value-of select="$textareacols"/>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:otherwise>
-                                                                               
                <xsl:text>60</xsl:text>
-                                                                               
        </xsl:otherwise>
-                                                                               
</xsl:choose>
+                                                       </xsl:choose>
+                                                       <xsl:attribute 
name="cols">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="$textareacols!=''">
+                                                                               
<xsl:value-of select="$textareacols"/>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:text>60</xsl:text>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </xsl:attribute>
+                                                       <xsl:attribute 
name="rows">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="$textarearows!=''">
+                                                                               
<xsl:value-of select="$textarearows"/>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:text>6</xsl:text>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value"/>
+                                               </textarea>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='pwd'">
+                                               <input type="password" 
name="values_attribute[{counter}][value]" size="30">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="disabled!=''">
+                                                                       
<xsl:attribute name="disabled">
+                                                                               
<xsl:text> disabled</xsl:text>
                                                                        
</xsl:attribute>
-                                                                       
<xsl:attribute name="rows">
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="$textarearows!=''">
-                                                                               
                <xsl:value-of select="$textarearows"/>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:otherwise>
-                                                                               
                <xsl:text>6</xsl:text>
-                                                                               
        </xsl:otherwise>
-                                                                               
</xsl:choose>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:value-of select="value"/>
-                                                               </textarea>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='pwd'">
-                                                                               
        <input type="password" name="values_attribute[{counter}][value]" 
size="30">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
+                                                               </xsl:when>
                                                                <xsl:when 
test="nullable!='1'">
                                                                        
<xsl:attribute name="data-validation">
                                                                                
<xsl:text>required</xsl:text>
                                                                        
</xsl:attribute>
                                                                </xsl:when>
-                                                                               
                </xsl:choose>
-                                                                               
        </input>
-                                                                               
        <input type="password" name="values_attribute[{counter}][value2]" 
size="30">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="disabled!=''">
-                                                                               
                                <xsl:attribute name="disabled">
-                                                                               
                                        <xsl:text> disabled</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                               <input type="password" 
name="values_attribute[{counter}][value2]" 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:when>
-                                                       <xsl:when 
test="datatype='bolean'">
-                                                               <input 
id="id_{name}" type="checkbox" name="values_attribute[{counter}][value]" 
value="1">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="value!=''">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
-                                                               </input>
-                                                       </xsl:when>
-                                                       <xsl:when 
test="datatype='link'">
-                                                               <input 
type="text" name="values_attribute[{counter}][value]" value="{value}" size="30">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='bolean'">
+                                               <input id="id_{name}" 
type="checkbox" name="values_attribute[{counter}][value]" value="1">
+                                                       <xsl:choose>
+                                                               <xsl:when 
test="value!=''">
+                                                                       
<xsl:attribute name="checked">
+                                                                               
<xsl:text>checked</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:when>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='link'">
+                                               <input type="text" 
name="values_attribute[{counter}][value]" 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:when 
test="datatype='event'">
-                                                               <xsl:choose>
-                                                                       
<xsl:when test="warning!=''">
-                                                                               
<xsl:value-of select="warning"/>
-                                                                       
</xsl:when>
-                                                                       
<xsl:otherwise>
-                                                                               
<xsl:variable name="event_descr">
-                                                                               
        <xsl:value-of select="name"/>
-                                                                               
        <xsl:text>_descr</xsl:text>
-                                                                               
</xsl:variable>
-                                                                               
<xsl:variable name="lookup_function">
-                                                                               
        <xsl:text>lookup_</xsl:text>
-                                                                               
        <xsl:value-of select="name"/>
-                                                                               
        <xsl:text>();</xsl:text>
-                                                                               
</xsl:variable>
+                                               </xsl:choose>
+                                       </xsl:when>
+                                       <xsl:when test="datatype='event'">
+                                               <xsl:choose>
+                                                       <xsl:when 
test="warning!=''">
+                                                               <xsl:value-of 
select="warning"/>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:variable 
name="event_descr">
+                                                                       
<xsl:value-of select="name"/>
+                                                                       
<xsl:text>_descr</xsl:text>
+                                                               </xsl:variable>
+                                                               <xsl:variable 
name="lookup_function">
+                                                                       
<xsl:text>lookup_</xsl:text>
+                                                                       
<xsl:value-of select="name"/>
+                                                                       
<xsl:text>();</xsl:text>
+                                                               </xsl:variable>
                                                                <div 
class="pure-custom">
-                                                                               
                        <input type="text" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="6"/>
-                                                                               
                        <input size="30" type="text" name="{$event_descr}" 
value="{descr}" onClick="{$lookup_function}" readonly="readonly">
-                                                                               
                                <xsl:choose>
-                                                                               
                                        <xsl:when test="disabled!=''">
-                                                                               
                                                <xsl:attribute name="disabled">
-                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
-                                                                               
                                                </xsl:attribute>
-                                                                               
                                        </xsl:when>
-                                                                               
                                </xsl:choose>
-                                                                               
                        </input>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="next!=''">
+                                                                       <input 
type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6"/>
+                                                                       <input 
size="30" type="text" name="{$event_descr}" value="{descr}" 
onClick="{$lookup_function}" readonly="readonly">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="disabled!=''">
+                                                                               
                <xsl:attribute name="disabled">
+                                                                               
                        <xsl:text> disabled</xsl:text>
+                                                                               
                </xsl:attribute>
+                                                                               
        </xsl:when>
+                                                                               
</xsl:choose>
+                                                                       </input>
+                                                                       
<xsl:choose>
+                                                                               
<xsl:when test="next!=''">
                                                                                
        <div>
-                                                                               
                                        <xsl:value-of select="lang_next_run"/>
-                                                                               
                                        <xsl:text>: </xsl:text>
-                                                                               
                                        <xsl:value-of select="next"/>
+                                                                               
                <xsl:value-of select="lang_next_run"/>
+                                                                               
                <xsl:text>: </xsl:text>
+                                                                               
                <xsl:value-of select="next"/>
                                                                                
        </div>
                                                                                
        <div>
-                                                                               
                                        <xsl:value-of select="lang_enabled"/>
-                                                                               
                                        <xsl:text>: </xsl:text>
-                                                                               
                                        <xsl:value-of select="enabled"/>
+                                                                               
                <xsl:value-of select="lang_enabled"/>
+                                                                               
                <xsl:text>: </xsl:text>
+                                                                               
                <xsl:value-of select="enabled"/>
                                                                                
        </div>
-                                                                               
                </xsl:when>
-                                                                               
        </xsl:choose>
+                                                                               
</xsl:when>
+                                                                       
</xsl:choose>
                                                                </div>
-                                                                       
</xsl:otherwise>
-                                                               </xsl:choose>
-                                                       </xsl:when>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </xsl:when>
                                        <xsl:when test="datatype='I'">
                                                <input data-validation="number" 
id="id_{name}" type="text" name="values_attribute[{counter}][value]" 
value="{value}" size="30">
                                                        <xsl:choose>
@@ -710,66 +710,76 @@
                                                        </xsl:choose>
                                                </input>
                                        </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <input 
id="id_{name}" type="text" name="values_attribute[{counter}][value]" 
value="{value}" size="30">
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="disabled!=''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text> disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:when>
+                                       <xsl:otherwise>
+                                               <input id="id_{name}" 
type="text" name="values_attribute[{counter}][value]" size="30">
+                                                       <xsl:attribute 
name="value">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="value!=''">
+                                                                               
<xsl:value-of select="value"/>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:value-of select="default_value"/>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </xsl:attribute>
+                                                       <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:otherwise>
-                                               </xsl:choose>
-                                               <xsl:choose>
-                                                       <xsl:when 
test="history=1">
-                                                               <input 
type="text" id="values_attribute_{counter}_date" 
name="values_attribute[{counter}][date]" value="" size="12" maxlength="10" 
readonly="readonly">
-                                                               </input>
-                                                               <xsl:variable 
name="link_history">
-                                                                       
<xsl:value-of select="link_history"/>
-                                                               </xsl:variable>
-                                                               <xsl:variable 
name="lang_history_help">
-                                                                       
<xsl:value-of select="//lang_history_help"/>
-                                                               </xsl:variable>
-                                                               <xsl:variable 
name="lang_history">
-                                                                       
<xsl:value-of select="php:function('lang', 'history')" />
-                                                               </xsl:variable>
+                                                       </xsl:choose>
+                                               </input>
+                                       </xsl:otherwise>
+                               </xsl:choose>
+                               <xsl:choose>
+                                       <xsl:when test="history=1">
+                                               <input type="text" 
id="values_attribute_{counter}_date" name="values_attribute[{counter}][date]" 
value="" size="12" maxlength="10" readonly="readonly">
+                                               </input>
+                                               <xsl:variable 
name="link_history">
+                                                       <xsl:value-of 
select="link_history"/>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_history_help">
+                                                       <xsl:value-of 
select="//lang_history_help"/>
+                                               </xsl:variable>
+                                               <xsl:variable 
name="lang_history">
+                                                       <xsl:value-of 
select="php:function('lang', 'history')" />
+                                               </xsl:variable>
                                                <a 
href="javascript:JqueryPortico.showlightbox_history('{$link_history}')" 
title="{$lang_history}">
-                                                                       
<xsl:value-of select="$lang_history"/>
-                                                               </a>
-                                                       </xsl:when>
-                                               </xsl:choose>
+                                                       <xsl:value-of 
select="$lang_history"/>
+                                               </a>
                                        </xsl:when>
                                </xsl:choose>
+                       </xsl:when>
+               </xsl:choose>
        </div>
 </xsl:template>
 
 <!-- New template-->
 <xsl:template name="choice">
-               <xsl:variable name="counter">
-                       <xsl:value-of select="counter"/>
-               </xsl:variable>
-               <xsl:variable name="name">
-                       <xsl:value-of select="name"/>
-               </xsl:variable>
+       <xsl:variable name="counter">
+               <xsl:value-of select="counter"/>
+       </xsl:variable>
+       <xsl:variable name="name">
+               <xsl:value-of select="name"/>
+       </xsl:variable>
        <div class="pure-custom">
-                       <xsl:for-each select="choice">
-                                               <xsl:choose>
-                                                       <xsl:when 
test="checked='checked'">
-                                                               <input 
id="id_{$name}_{id}" type="{input_type}" 
name="values_attribute[{$counter}][value][]" value="{id}" checked="checked"/>
-                                                       </xsl:when>
-                                                       <xsl:otherwise>
-                                                               <input 
id="id_{$name}_{id}" type="{input_type}" 
name="values_attribute[{$counter}][value][]" value="{id}"/>
-                                                       </xsl:otherwise>
-                                               </xsl:choose>
-                                               <xsl:value-of select="value"/>
+               <xsl:for-each select="choice">
+                       <xsl:choose>
+                               <xsl:when test="checked='checked'">
+                                       <input id="id_{$name}_{id}" 
type="{input_type}" name="values_attribute[{$counter}][value][]" value="{id}" 
checked="checked"/>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <input id="id_{$name}_{id}" 
type="{input_type}" name="values_attribute[{$counter}][value][]" value="{id}"/>
+                               </xsl:otherwise>
+                       </xsl:choose>
+                       <xsl:value-of select="value"/>
                        <br></br>
-                       </xsl:for-each>
+               </xsl:for-each>
        </div>
 </xsl:template>




reply via email to

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