[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15261] property: hide fields until ready
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15261] property: hide fields until ready |
Date: |
Tue, 7 Jun 2016 09:39:08 +0000 (UTC) |
Revision: 15261
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15261
Author: sigurdne
Date: 2016-06-07 09:39:08 +0000 (Tue, 07 Jun 2016)
Log Message:
-----------
property: hide fields until ready
Modified Paths:
--------------
trunk/property/inc/class.uitts.inc.php
trunk/property/templates/base/tts.xsl
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2016-06-07 09:38:19 UTC (rev
15260)
+++ trunk/property/inc/class.uitts.inc.php 2016-06-07 09:39:08 UTC (rev
15261)
@@ -2736,8 +2736,9 @@
$active_tab = 'general';
$unspsc_code = $ticket['unspsc_code'] ?
$ticket['unspsc_code'] :
$GLOBALS['phpgw_info']['user']['preferences']['property']['unspsc_code'];
- $data = array
- (
+ $enable_order_service_id =
isset($config->config_data['enable_order_service_id']) &&
$config->config_data['enable_order_service_id'] ? true : false;
+ $enable_unspsc =
isset($config->config_data['enable_unspsc']) &&
$config->config_data['enable_unspsc'] ? true : false;
+ $data = array(
'datatable_def' => $datatable_def,
'my_groups' => json_encode($my_groups),
'custom_attributes' => array('attributes' =>
$ticket['attributes']),
@@ -2746,6 +2747,8 @@
'value_sms_phone' => $ticket['contact_phone'],
'access_order' => $access_order,
'currency' =>
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
+ 'enable_unspsc' => $enable_unspsc,
+ 'enable_order_service_id' =>
$enable_order_service_id,
'value_order_id' => $ticket['order_id'],
'value_order_descr' => $ticket['order_descr'],
'vendor_data' => $vendor_data,
Modified: trunk/property/templates/base/tts.xsl
===================================================================
--- trunk/property/templates/base/tts.xsl 2016-06-07 09:38:19 UTC (rev
15260)
+++ trunk/property/templates/base/tts.xsl 2016-06-07 09:39:08 UTC (rev
15261)
@@ -669,25 +669,27 @@
<xsl:apply-templates select="contract_list/options"/>
</select>
</div>
- <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:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
+ <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"/>
-
</xsl:attribute>
-
</input>
+
</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: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>
+
</input>
-
<div id="service_container"/>
- </div>
+
<div id="service_container"/>
+
</div>
+
</xsl:if>
<div
class="pure-control-group">
<xsl:variable name="lang_dimb">
<xsl:value-of select="php:function('lang', 'dimb')"/>
@@ -724,24 +726,26 @@
</input>
<div id="b_account_container"/>
</div>
- <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:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
+ <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"/>
-
</xsl:attribute>
-
</input>
-
<div id="unspsc_code_container"/>
- </div>
+
</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: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>
+
</input>
+
<div id="unspsc_code_container"/>
+
</div>
+
</xsl:if>
<div
class="pure-control-group">
<xsl:variable name="lang_building_part">
@@ -808,26 +812,28 @@
<xsl:apply-templates select="order_dim1_list/options"/>
</select>
</div>
- <div
class="pure-control-group">
-
<xsl:variable name="lang_tax_code">
-
<xsl:value-of select="php:function('lang', 'tax code')"/>
-
</xsl:variable>
-
<label>
-
<xsl:value-of select="$lang_tax_code"/>
-
</label>
-
<select name="values[tax_code]">
-
<xsl:attribute name="title">
+ <xsl:if
test="enable_unspsc = 1">
+
<div class="pure-control-group">
+
<xsl:variable name="lang_tax_code">
+
<xsl:value-of select="php:function('lang', 'tax code')"/>
+
</xsl:variable>
+
<label>
<xsl:value-of select="$lang_tax_code"/>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation">
-
<xsl:text>required</xsl:text>
-
</xsl:attribute>
-
<xsl:attribute name="data-validation-error-msg">
-
<xsl:value-of select="$lang_tax_code"/>
-
</xsl:attribute>
-
<xsl:apply-templates select="tax_code_list/options"/>
-
</select>
- </div>
+
</label>
+
<select name="values[tax_code]">
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_tax_code"/>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation">
+
<xsl:text>required</xsl:text>
+
</xsl:attribute>
+
<xsl:attribute name="data-validation-error-msg">
+
<xsl:value-of select="$lang_tax_code"/>
+
</xsl:attribute>
+
<xsl:apply-templates select="tax_code_list/options"/>
+
</select>
+
</div>
+
</xsl:if>
<div
class="pure-control-group">
<label>
<a href="javascript:template_lookup()">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15261] property: hide fields until ready,
sigurdne <=