From 1dbf87cf0aaf36fdcd72eae0a12bd9798536c512 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 15 Oct 2014 10:58:20 +0200 Subject: [PATCH] LSformElement : add no_value_label parameter --- doc/conf/LSattribute.docbook | 8 ++++++++ public_html/includes/class/class.LSformElement.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/conf/LSattribute.docbook b/doc/conf/LSattribute.docbook index 9efa0762..7c34089c 100644 --- a/doc/conf/LSattribute.docbook +++ b/doc/conf/LSattribute.docbook @@ -27,6 +27,7 @@ 'html_options' => array( // Options HTML liées au type HTML de l'attribut ), + 'no_value_label' => '[No set value label]', 'multiple' => 0, 'required' => 1, 'generate_function' => 'fonction1', @@ -124,6 +125,13 @@ + + no_value_label + + Label affiché lorsque l'attribut n'a pas de valeur (facultatif). + + + multiple diff --git a/public_html/includes/class/class.LSformElement.php b/public_html/includes/class/class.LSformElement.php index c3867544..af54aa76 100644 --- a/public_html/includes/class/class.LSformElement.php +++ b/public_html/includes/class/class.LSformElement.php @@ -286,7 +286,7 @@ class LSformElement { 'value' => '', 'values' => $this -> values, 'attr_name' => $this -> name, - 'noValueTxt' => _('No set value'), + 'noValueTxt' => ( (isset($this -> params['no_value_label']))? __($this -> params['no_value_label']):_('No set value') ), 'fieldTemplate' => $this -> fieldTemplate ) )