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

17 lines
562 B
Smarty

{**
* Выпадающий список
*}
{extends './field.tpl'}
{block 'field_input'}
<select {field_input_attr_common bUseValue=false} {if $smarty.local.isMultiple}multiple{/if}>
{foreach $aItems as $aItem}
{$isSelected = ( is_array( $sSelectedValue ) ) ? in_array( $aItem.value, $sSelectedValue ) : ( $aItem.value == $sSelectedValue )}
<option value="{$aItem.value}" {if $isSelected}selected{/if}>
{$aItem.text|indent:( $aItem.level * 5 ):'&nbsp;'}
</option>
{/foreach}
</select>
{/block}