{*
  Template to display config options used by setup.tpl and profile.tpl
*}
<div>
<!-- {$smarty.template} -->
{counter start=1 print=false name=optcount}
{foreach from=$setup item=option}

    {if $option.group}
		</div> <!-- {$count} -->
		{counter assign=count name=optcount}
		<br />
		<div id="barre-option"><a class="opt-group" href="javascript:" onclick="blocking('BL{$count}','yes', 'block'); return false;">{$lang[$option.group]}</a></div>
		<div id="BL{$count}" style="display:none;">
    {else}
		<table class="{cycle values="optionseven,optionsodd"}"  border="0" cellspacing="0" cellspadding="0" width="100%">
			<tr><td colspan="2"><b>{$option.hl}</b></td></tr>
			<tr>
			<td width="25%">
				{if $option.type == 'text'}
					<input type="text" size="20" name="{$option.name}" id="{$option.name}" value="{$option.set|escape}" class="center" />
				{/if}
				{if $option.type == 'textarea'}
					<textarea cols="40" rows="4" name="{$option.name}" id="{$option.name}" wrap="virtual">{$option.set|escape}</textarea>
				{/if}
				{if $option.type == 'date'}
					<input type="text" size="8" name="{$option.name}" id="{$option.name}" value="{$option.set|escape}" class="center" />
				{/if}
				{if $option.type == 'boolean'}
                	{html_checkbox name=$option.name id=$option.name value=1 checked=$option.set}
            	{/if}
				{if $option.type == 'dropdown'}
					{html_options name=$option.name options=$option.data selected=$option.set}
				{/if}
				{if $option.type == 'image'}
				<input name="{$option.name}" id="{$option.name}" size="50" type="file">
				{/if}
				{if $option.type == 'multi'}
					<select name="{$option.name}[]" size="5" multiple="multiple">
						<option value=""></option>
						{html_options options=$option.data selected=$option.set}
					</select>
				{/if}
	
				{if $option.type == 'special'}
					{$option.data}
				{/if}
	
				{if $option.type == 'link'}
					<a href="{$option.data}">{$option.hl}</a>
				{/if}
			</td>
			<td valign="top" class="td-help">
				{$option.help}
			</td>
		</tr>
		</table>    
    {/if}
	
{/foreach}
