LSformElement : add no_value_label parameter

This commit is contained in:
Benjamin Renard 2014-10-15 10:58:20 +02:00
parent 6d9688ac9b
commit 1dbf87cf0a
2 changed files with 9 additions and 1 deletions

View file

@ -27,6 +27,7 @@
'html_options' => array( 'html_options' => array(
// Options HTML liées au type HTML de l'attribut // Options HTML liées au type HTML de l'attribut
), ),
'no_value_label' => '[No set value label]',
'multiple' => 0, 'multiple' => 0,
'required' => 1, 'required' => 1,
'generate_function' => 'fonction1', 'generate_function' => 'fonction1',
@ -124,6 +125,13 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>no_value_label</term>
<listitem>
<simpara>Label affiché lorsque l'attribut n'a pas de valeur (facultatif).</simpara>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>multiple</term> <term>multiple</term>
<listitem> <listitem>

View file

@ -286,7 +286,7 @@ class LSformElement {
'value' => '', 'value' => '',
'values' => $this -> values, 'values' => $this -> values,
'attr_name' => $this -> name, '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 'fieldTemplate' => $this -> fieldTemplate
) )
) )