2018-06-15 15:25:25 +02:00
|
|
|
<ul class='LSform' id='{$attr_name|escape:"htmlall"}'>
|
2014-06-18 00:15:50 +02:00
|
|
|
{if $freeze}
|
|
|
|
{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>
|
2014-06-18 00:15:50 +02:00
|
|
|
{else}
|
|
|
|
<li class='LSform-errors'>{getFData format=$unrecognized_value_label_format data=$value}</li>
|
|
|
|
{/if}
|
|
|
|
{foreachelse}
|
2018-06-11 11:50:17 +02:00
|
|
|
<li>{$noValueTxt|escape:"htmlall"}</li>
|
2014-06-18 00:15:50 +02:00
|
|
|
{/foreach}
|
|
|
|
{else}
|
|
|
|
{foreach from=$possible_values item=label key=value name=LSformElement_selectbox}
|
2015-07-25 18:23:06 +02:00
|
|
|
{if is_array($label)}
|
|
|
|
{if count($label.possible_values)>0}
|
|
|
|
<li>
|
2018-06-11 11:50:17 +02:00
|
|
|
<span class='LSformElement_selectbox_sub_values_label'>{$label.label|escape:"htmlall"} :</span>
|
2015-07-25 18:23:06 +02:00
|
|
|
<ul class='LSformElement_selectbox_sub_values'>
|
|
|
|
{foreach from=$label.possible_values item=l key=v name=LSformElement_selectbox_sub_values}
|
|
|
|
<li>
|
2018-09-19 18:56:47 +02:00
|
|
|
<input type='{if $multiple}checkbox{else}radio{/if}' name='{$attr_name|escape:"htmlall"}[]' class='LSformElement_selectbox' id='LSformElement_selectbox_{$attr_name|escape:"htmlall"}_{$smarty.foreach.LSformElement_selectbox.index}_{$smarty.foreach.LSformElement_selectbox_sub_values.index}' value='{$v|escape:"htmlall"}' {if in_array($v,$values)}checked{/if}/> <label for='LSformElement_selectbox_{$attr_name|escape:"htmlall"}_{$smarty.foreach.LSformElement_selectbox.index}_{$smarty.foreach.LSformElement_selectbox_sub_values.index}'>{if $translate_labels}{tr msg=$l}{else}{$l}{/if}</label>
|
2015-07-25 18:23:06 +02:00
|
|
|
</li>
|
|
|
|
{/foreach}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{/if}
|
|
|
|
{else}
|
|
|
|
<li>
|
2018-06-15 15:25:25 +02:00
|
|
|
<input type='{if $multiple}checkbox{else}radio{/if}' name='{$attr_name|escape:"htmlall"}[]' class='LSformElement_selectbox' id='LSformElement_selectbox_{$attr_name|escape:"htmlall"}_{$smarty.foreach.LSformElement_selectbox.index}' value='{$value|escape:"htmlall"}' {if in_array($value,$values)}checked{/if}/> <label for='LSformElement_selectbox_{$attr_name|escape:"htmlall"}_{$smarty.foreach.LSformElement_selectbox.index}'>{tr msg=$label}</label>
|
2015-07-25 18:23:06 +02:00
|
|
|
</li>
|
|
|
|
{/if}
|
2014-06-18 00:15:50 +02:00
|
|
|
{/foreach}
|
|
|
|
{/if}
|
|
|
|
</ul>
|