2014-05-10 18:37:29 +03:00
|
|
|
{**
|
|
|
|
* Выпадающий список
|
|
|
|
*}
|
|
|
|
|
|
|
|
{extends './field.tpl'}
|
|
|
|
|
|
|
|
{block 'field_input'}
|
2014-10-18 09:07:45 +03:00
|
|
|
<select {field_input_attr_common useValue=false} {if $smarty.local.isMultiple}multiple{/if}>
|
|
|
|
{foreach $smarty.local.items as $item}
|
|
|
|
{$isSelected = ( is_array( $selectedValue ) ) ? in_array( $item.value, $selectedValue ) : ( $item.value == $selectedValue )}
|
2014-07-15 19:21:49 +03:00
|
|
|
|
2014-10-18 09:07:45 +03:00
|
|
|
<option value="{$item.value}" {if $isSelected}selected{/if}>
|
|
|
|
{$item.text|indent:( $item.level * 5 ):' '}
|
2014-07-15 19:21:49 +03:00
|
|
|
</option>
|
2014-05-10 18:37:29 +03:00
|
|
|
{/foreach}
|
|
|
|
</select>
|
|
|
|
{/block}
|