2018-06-15 15:25:25 +02:00
|
|
|
<ul class='LSform' id='{$attr_name|escape:"htmlall"}'>
|
2008-10-16 15:03:45 +02:00
|
|
|
{if $freeze}
|
2008-10-27 11:56:19 +01:00
|
|
|
{foreach from=$values item=value}
|
2015-07-25 18:23:06 +02:00
|
|
|
{LSformElement_select_checkIsValidValue value=$value possible_values=$possible_values}
|
|
|
|
{if $LSformElement_select_isValidValue}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li>{$LSformElement_select_isValidValue_label|escape:"htmlall"}</li>
|
2010-11-15 17:33:47 +01:00
|
|
|
{else}
|
|
|
|
<li class='LSform-errors'>{getFData format=$unrecognized_value_label_format data=$value}</li>
|
|
|
|
{/if}
|
2008-10-27 11:56:19 +01:00
|
|
|
{foreachelse}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li>{$noValueTxt|escape:"htmlall"}</li>
|
2008-10-27 11:56:19 +01:00
|
|
|
{/foreach}
|
2008-10-16 15:03:45 +02:00
|
|
|
{else}
|
2008-10-27 11:56:19 +01:00
|
|
|
<li>
|
2018-06-15 15:25:25 +02:00
|
|
|
<select name='{$attr_name|escape:"htmlall"}[]' {if $multiple}multiple{/if} class='LSformElement_select'>
|
2015-07-25 18:23:06 +02:00
|
|
|
{foreach from=$possible_values key=key item=label}
|
|
|
|
{if is_array($label)}
|
|
|
|
{if count($label.possible_values)>0}
|
2018-06-15 15:25:25 +02:00
|
|
|
<optgroup label='{$label.label|escape:"htmlall"}'>
|
2015-07-25 18:23:06 +02:00
|
|
|
{html_options options=$label.possible_values selected=$values}
|
|
|
|
</optgroup>
|
|
|
|
{/if}
|
|
|
|
{else}
|
2018-06-15 15:25:25 +02:00
|
|
|
<option value='{$key|escape:"htmlall"}' {if in_array($key,$values)}selected{/if}>{$label|escape:"htmlall"}</option>
|
2015-07-25 18:23:06 +02:00
|
|
|
{/if}
|
|
|
|
{/foreach}
|
2008-10-27 11:56:19 +01:00
|
|
|
</select>
|
|
|
|
</li>
|
2008-10-16 15:03:45 +02:00
|
|
|
{/if}
|
2008-10-27 11:56:19 +01:00
|
|
|
</ul>
|