mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-05 07:54:24 +03:00
17 lines
564 B
Smarty
17 lines
564 B
Smarty
{**
|
|
* Выпадающий список
|
|
*}
|
|
|
|
{extends './field.tpl'}
|
|
|
|
{block 'field_input'}
|
|
<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 )}
|
|
|
|
<option value="{$item.value}" {if $isSelected}selected{/if}>
|
|
{$item.text|indent:( $item.level * 5 ):' '}
|
|
</option>
|
|
{/foreach}
|
|
</select>
|
|
{/block} |