1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 07:54:24 +03:00
ifhub.club/application/frontend/skin/developer/components/field/field.select.tpl
2014-10-18 13:07:45 +07:00

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 ):'&nbsp;'}
</option>
{/foreach}
</select>
{/block}