2008-10-27 11:56:19 +01:00
|
|
|
<ul class='LSform' id='{$attr_name}'>
|
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}
|
|
|
|
<li>{$LSformElement_select_isValidValue_label}</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}
|
|
|
|
<li>{$noValueTxt}</li>
|
|
|
|
{/foreach}
|
2008-10-16 15:03:45 +02:00
|
|
|
{else}
|
2008-10-27 11:56:19 +01:00
|
|
|
<li>
|
|
|
|
<select name='{$attr_name}[]' {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}
|
|
|
|
<optgroup label="{$label.label}">
|
|
|
|
{html_options options=$label.possible_values selected=$values}
|
|
|
|
</optgroup>
|
|
|
|
{/if}
|
|
|
|
{else}
|
|
|
|
<option value="{$key}" {if in_array($key,$values)}selected{/if}>{$label}</option>
|
|
|
|
{/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>
|