ldapsaisie/src/templates/default/LSformElement_select.tpl
Benjamin Renard 7098b3ee79 Massive change of files organisation to move all files outside web-root
The web-root directory now contains URL rewrite stuff. All PHP & static files are
in root src directory and are served via LSurl routes.
2020-05-06 12:17:35 +02:00

30 lines
1.1 KiB
Smarty

<ul class='LSform' id='{$attr_name|escape:"htmlall"}'>
{if $freeze}
{foreach from=$values item=value}
{LSformElement_select_checkIsValidValue value=$value possible_values=$possible_values}
{if $LSformElement_select_isValidValue}
<li>{$LSformElement_select_isValidValue_label|escape:"htmlall"}</li>
{else}
<li class='LSform-errors'>{getFData format=$unrecognized_value_label_format data=$value}</li>
{/if}
{foreachelse}
<li>{$noValueTxt|escape:"htmlall"}</li>
{/foreach}
{else}
<li>
<select name='{$attr_name|escape:"htmlall"}[]' {if $multiple}multiple{/if} class='LSformElement_select'>
{foreach from=$possible_values key=key item=label}
{if is_array($label)}
{if count($label.possible_values)>0}
<optgroup label='{$label.label|escape:"htmlall"}'>
{html_options options=$label.possible_values selected=$values}
</optgroup>
{/if}
{else}
<option value='{$key|escape:"htmlall"}' {if in_array($key,$values)}selected{/if}>{$label|escape:"htmlall"}</option>
{/if}
{/foreach}
</select>
</li>
{/if}
</ul>