Файл: libs/tpl/form.tpl
Строк: 115
<div class='form'>
<form{if $method}
method="{$method}"{/if}{if $action}
action="{$action}"{/if}{if $files}
enctype="multipart/form-data"{/if}>
{section name=sect
loop=$el}
{if $el[sect].type eq 'text'}
{$el[sect].value}
{elseif
$el[sect].type eq 'input'}
{if
$el[sect].title}{$el[sect].title}:<br/>{/if}<input
type="text"{if $el[sect].info.size}
size="{$el[sect].info.size}"{/if}{if $el[sect].info.disabled}
disabled="disabled"{/if}{if $el[sect].info.name}
name="{$el[sect].info.name}"{/if}{if $el[sect].info.value}
value="{$el[sect].info.value}"{/if}{if $el[sect].info.maxlength}
maxlength="{$el[sect].info.maxlength}"{/if} />
{elseif
$el[sect].type eq 'radio'}
{html_radios name=$el[sect].info.name
values=$el[sect].info.values output=$el[sect].info.output
selected=$el[sect].info.selected separator="<br
/>"}
{elseif $el[sect].type eq 'hidden'}
<input
type="hidden"{if $el[sect].info.name}
name="{$el[sect].info.name}"{/if}{if $el[sect].info.value}
value="{$el[sect].info.value}"{/if} />
{elseif
$el[sect].type eq 'password'}
{if
$el[sect].title}{$el[sect].title}:<br/>{/if}<input
type="password"{if $el[sect].info.size}
size="{$el[sect].info.size}"{/if}{if $el[sect].info.name}
name="{$el[sect].info.name}"{/if}{if $el[sect].info.value}
value="{$el[sect].info.value
}"{/if}{if
$el[sect].info.maxlength}
maxlength="{$el[sect].info.maxlength}"{/if} />
{elseif
$el[sect].type eq 'textarea'}
{if
$el[sect].title}{$el[sect].title}:<br/>{/if}<textarea{if
$el[sect].info.name} name="{$el[sect].info.name}"{/if}>{if
$el[sect].info.value}{$el[sect].info.value}{/if}</textarea>
{elseif
$el[sect].type eq 'checkbox'}
<input type="checkbox"{if
$el[sect].info.name} name="{$el[sect].info.name}"{/if}{if
$el[sect].info.value} value="{$el[sect].info.value}"{/if}{if
$el[sect].info.checked} checked="checked"{/if} />{if
$el[sect].info.text} {$el[sect].info.text}{/if}
{elseif $el[sect].type eq
'link'}
<a
href='{$el[sect].info.href}'>{$el[sect].info.name}</a>
{elseif
$el[sect].type eq 'submit'}
<input type="submit"{if
$el[sect].info.name} name="{$el[sect].info.name}"{/if}{if
$el[sect].info.value} value="{$el[sect].info.value}"{/if}
/>
{elseif $el[sect].type eq 'file'}
{if
$el[sect].title}{$el[sect].title}:<br/>{/if}<input
type="file"{if $el[sect].info.name}
name="{$el[sect].info.name}"{/if} />
{elseif $el[sect].type
eq 'select'}{if
$el[sect].title}{$el[sect].title}:<br/>{/if}
<select
name="{$el[sect].info.name}">
{section name=select
loop=$el[sect].info.options}
{if
$el[sect].info.options[select].groupstart}
<optgroup
label="{$el[sect].info.options[select].0}">
{elseif
$el[sect].info.options[select].groupend}
</optgroup>
{else}
<option{if
$el[sect].info.options[select].2} selected="selected"{/if}
value="{$el[sect].info.options[select].0}">{$el[sect].info.options[select].1}</option>
{/if}
{/section}
</select>
{/if}
{if
$el[sect].br}
<br
/>
{/if}
{/section}
</form>
</div>