mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSformElement_select : Added error message on display an unrecognized value
This commit is contained in:
parent
90e471646d
commit
a85623dc23
2 changed files with 5 additions and 0 deletions
|
@ -55,6 +55,7 @@ class LSformElement_select extends LSformElement {
|
||||||
LSsession :: addJSscript('LSformElement_select.js');
|
LSsession :: addJSscript('LSformElement_select.js');
|
||||||
}
|
}
|
||||||
$params['possible_values'] = $this -> params['text_possible_values'];
|
$params['possible_values'] = $this -> params['text_possible_values'];
|
||||||
|
$params['unrecognized_value_label_format'] = _("%{value} (unrecognized value)");
|
||||||
$return['html'] = $this -> fetchTemplate(NULL,$params);
|
$return['html'] = $this -> fetchTemplate(NULL,$params);
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
<ul class='LSform' id='{$attr_name}'>
|
<ul class='LSform' id='{$attr_name}'>
|
||||||
{if $freeze}
|
{if $freeze}
|
||||||
{foreach from=$values item=value}
|
{foreach from=$values item=value}
|
||||||
|
{if $possible_values.$value}
|
||||||
<li>{$possible_values.$value}</li>
|
<li>{$possible_values.$value}</li>
|
||||||
|
{else}
|
||||||
|
<li class='LSform-errors'>{getFData format=$unrecognized_value_label_format data=$value}</li>
|
||||||
|
{/if}
|
||||||
{foreachelse}
|
{foreachelse}
|
||||||
<li>{$noValueTxt}</li>
|
<li>{$noValueTxt}</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
|
Loading…
Reference in a new issue