countryselector.tpl 1.07 KB
Newer Older
1
<select name="{$field.ins_id}">
2 3
	{if $field.isMandatory ne 'y' || empty($field.value)}
		<option value=""{if $field.value eq '' or $field.value eq 'None'} selected="selected"{/if}>&nbsp;</option>
4
	{/if}
5 6
	{if empty($field.itemChoices)}
		<option value="Other"{if $field.value eq 'None'} selected="selected"{/if}{if $field.options_array[0] ne '1'} style="background-image:url('img/flags/Other.gif');background-repeat:no-repeat;padding-left:25px;padding-bottom:3px;"{/if}>{tr}Other{/tr}</option>
7 8
	{/if}

9 10 11
	{foreach key=flagicon item=flag from=$field.flags}
		{if $flagicon ne 'None' and $flagicon ne 'Other' and ( ! isset($field.itemChoices) || $field.itemChoices|@count eq 0 || in_array($flagicon, $field.itemChoices) )}
			 <option value="{$flagicon|escape}" {if $field.value eq $flagicon}selected="selected"{elseif $flagicon eq $field.defaultvalue}selected="selected"{/if}{if $field.options_array[0] ne '1'} style="background-image:url('img/flags/{$flagicon}.gif');background-repeat:no-repeat;padding-left:25px;padding-bottom:3px;"{/if}>{$flag|escape}</option>
12 13 14
		 {/if}
	{/foreach} 
</select>