fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15219] property: configurable fields in workorder fo


From: sigurdne
Subject: [Fmsystem-commits] [15219] property: configurable fields in workorder form
Date: Mon, 30 May 2016 09:15:35 +0000 (UTC)

Revision: 15219
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15219
Author:   sigurdne
Date:     2016-05-30 09:15:35 +0000 (Mon, 30 May 2016)
Log Message:
-----------
property: configurable fields in workorder form

Modified Paths:
--------------
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/templates/base/config.tpl
    trunk/property/templates/base/workorder.xsl

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2016-05-30 08:10:34 UTC 
(rev 15218)
+++ trunk/property/inc/class.uiworkorder.inc.php        2016-05-30 09:15:35 UTC 
(rev 15219)
@@ -2195,8 +2195,9 @@
 
                        $unspsc_code = $values['unspsc_code'] ? 
$values['unspsc_code'] : 
$GLOBALS['phpgw_info']['user']['preferences']['property']['unspsc_code'];
 
-                       $data = array
-                               (
+                       $enable_unspsc = 
isset($config->config_data['enable_unspsc']) && 
$config->config_data['enable_unspsc'] ? true : false;
+                       $enable_order_service_id = 
isset($config->config_data['enable_order_service_id']) && 
$config->config_data['enable_order_service_id'] ? true : false;
+                       $data = array(
                                'datatable_def' => $datatable_def,
                                'periodization_data' => $periodization_data,
                                'year_list' => array(
@@ -2208,6 +2209,8 @@
                                'lang_claim' => lang('claim'),
                                'suppressmeter' => 
isset($config->config_data['project_suppressmeter']) && 
$config->config_data['project_suppressmeter'] ? 1 : '',
                                'suppresscoordination' => $suppresscoordination,
+                               'enable_unspsc' => $enable_unspsc,
+                               'enable_order_service_id' => 
$enable_order_service_id,
                                'tabs' => self::_generate_tabs(array(), 
$active_tab, array(
                                        'documents' => $id ? false : true,
                                        'history' => $id ? false : true)),

Modified: trunk/property/templates/base/config.tpl
===================================================================
--- trunk/property/templates/base/config.tpl    2016-05-30 08:10:34 UTC (rev 
15218)
+++ trunk/property/templates/base/config.tpl    2016-05-30 09:15:35 UTC (rev 
15219)
@@ -189,9 +189,25 @@
                                </select>
                        </td>
                </tr>
-
-
                <tr class="pure-table-odd">
+                       <td>{lang_enable_UNSPSC_kode}:</td>
+                       <td>
+                               <select name="newsettings[enable_unspsc]">
+                                       <option value="" 
{selected_enable_unspsc_}>NO</option>
+                                       <option value="1" 
{selected_enable_unspsc_1}>YES</option>
+                               </select>
+                       </td>
+               </tr>
+               <tr>
+                       <td>{lang_enable_order_service_id}:</td>
+                       <td>
+                               <select 
name="newsettings[enable_order_service_id]">
+                                       <option value="" 
{selected_enable_order_service_id_}>NO</option>
+                                       <option value="1" 
{selected_enable_order_service_id_1}>YES</option>
+                               </select>
+                       </td>
+               </tr>
+               <tr class="pure-table-odd">
                        <td>{lang_Default_municipal_number}:</td>
                        <td><input name="newsettings[default_municipal]" 
value="{value_default_municipal}"></td>
                </tr>

Modified: trunk/property/templates/base/workorder.xsl
===================================================================
--- trunk/property/templates/base/workorder.xsl 2016-05-30 08:10:34 UTC (rev 
15218)
+++ trunk/property/templates/base/workorder.xsl 2016-05-30 09:15:35 UTC (rev 
15219)
@@ -564,34 +564,36 @@
                                                        </xsl:if>
                                                </input>
                                        </div>
+                                       <xsl:if test="enable_order_service_id = 
1">
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_service">
+                                                               <xsl:value-of 
select="php:function('lang', 'service')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_service"/>
+                                                       </label>
+                                                       <input type="hidden" 
id="service_id" name="values[service_id]"  value="{value_service_id}"/>
+                                                       <input type="text" 
id="service_name" name="values[service_name]" value="{value_service_name}">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="mode='edit'">
+                                                                               
<!--xsl:attribute name="data-validation">
+                                                                               
        <xsl:text>required</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:attribute name="data-validation-error-msg">
+                                                                               
        <xsl:value-of select="$lang_service"/>
+                                                                               
</xsl:attribute-->
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:attribute name="disabled">
+                                                                               
        <xsl:text>disabled</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </input>
+                                                       <div 
id="service_container"/>
+                                               </div>
+                                       </xsl:if>
                                        <div class="pure-control-group">
-                                               <xsl:variable 
name="lang_service">
-                                                       <xsl:value-of 
select="php:function('lang', 'service')"/>
-                                               </xsl:variable>
-                                               <label>
-                                                       <xsl:value-of 
select="$lang_service"/>
-                                               </label>
-                                               <input type="hidden" 
id="service_id" name="values[service_id]"  value="{value_service_id}"/>
-                                               <input type="text" 
id="service_name" name="values[service_name]" value="{value_service_name}">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="mode='edit'">
-                                                                       
<!--xsl:attribute name="data-validation">
-                                                                               
<xsl:text>required</xsl:text>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="data-validation-error-msg">
-                                                                               
<xsl:value-of select="$lang_service"/>
-                                                                       
</xsl:attribute-->
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:attribute name="disabled">
-                                                                               
<xsl:text>disabled</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </input>
-                                               <div id="service_container"/>
-                                       </div>
-                                       <div class="pure-control-group">
                                                <xsl:variable name="lang_dimb">
                                                        <xsl:value-of 
select="php:function('lang', 'dimb')"/>
                                                </xsl:variable>
@@ -654,34 +656,35 @@
                                                </input>
                                                <div id="b_account_container"/>
                                        </div>
-                                       <!--xsl:call-template 
name="b_account_form"/-->
-                                       <div class="pure-control-group">
-                                               <xsl:variable 
name="lang_unspsc_code">
-                                                       <xsl:value-of 
select="php:function('lang', 'unspsc code')"/>
-                                               </xsl:variable>
-                                               <label>
-                                                       <xsl:value-of 
select="$lang_unspsc_code"/>
-                                               </label>
-                                               <input type="hidden" 
id="unspsc_code" name="values[unspsc_code]"  value="{value_unspsc_code}"/>
-                                               <input type="text" 
id="unspsc_code_name" name="values[unspsc_code_name]" 
value="{value_unspsc_code} {value_unspsc_code_name}">
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="mode='edit'">
-                                                                       
<!--xsl:attribute name="data-validation">
-                                                                               
<xsl:text>required</xsl:text>
-                                                                       
</xsl:attribute>
-                                                                       
<xsl:attribute name="data-validation-error-msg">
-                                                                               
<xsl:value-of select="$lang_unspsc_code"/>
-                                                                       
</xsl:attribute-->
-                                                               </xsl:when>
-                                                               <xsl:otherwise>
-                                                                       
<xsl:attribute name="disabled">
-                                                                               
<xsl:text>disabled</xsl:text>
-                                                                       
</xsl:attribute>
-                                                               </xsl:otherwise>
-                                                       </xsl:choose>
-                                               </input>
-                                               <div 
id="unspsc_code_container"/>
-                                       </div>
+                                       <xsl:if test="enable_unspsc = 1">
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_unspsc_code">
+                                                               <xsl:value-of 
select="php:function('lang', 'unspsc code')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_unspsc_code"/>
+                                                       </label>
+                                                       <input type="hidden" 
id="unspsc_code" name="values[unspsc_code]"  value="{value_unspsc_code}"/>
+                                                       <input type="text" 
id="unspsc_code_name" name="values[unspsc_code_name]" 
value="{value_unspsc_code} {value_unspsc_code_name}">
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="mode='edit'">
+                                                                               
<!--xsl:attribute name="data-validation">
+                                                                               
        <xsl:text>required</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                               
<xsl:attribute name="data-validation-error-msg">
+                                                                               
        <xsl:value-of select="$lang_unspsc_code"/>
+                                                                               
</xsl:attribute-->
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<xsl:attribute name="disabled">
+                                                                               
        <xsl:text>disabled</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </input>
+                                                       <div 
id="unspsc_code_container"/>
+                                               </div>
+                                       </xsl:if>
                                        <xsl:choose>
                                                <xsl:when 
test="collect_building_part=1">
                                                        <div 
class="pure-control-group">




reply via email to

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