{*
---------------------------------------------------------------
HANDLER FOR DB FORM INPUT FIELDS
---------------------------------------------------------------
*}

	{if $field.type == 'hidden' and !$field.view_hidden_field}
	{$field.input}
	{else}
	<div class="dbform_row" id="dbfdiv{$field.name}">
		<div id="dbform_row_title">{if $field.title != ''}{$field.title}{else}{$field.name}{/if}</div>
		<div class="dbform_row_field" id="dbfdivfield{$field.name}">
			{if $field.errors}<span class="dbFormError">{$ERROR_STRING}</span><br />{/if}
			
			{if $field.ajax_multiselect}
				<div id="yaliposdiv{$field.name}"></div>
				<table border="0" cellpadding="2" cellspacing="0">
				<tr>
					<td>{$field.input}</td>
					<td valign="top"><a title="{$TEXT_ADD_ELEMENT}" href="javascript:ajax_multiselect_add('{$FORM_NAME}','{$field.name}',yali{$field.ajax_function});"><img src="images/plus.gif" border="0" /></a><br /><a href="javascript:ajax_multiselect_remove('{$FORM_NAME}','{$field.name}');" title="{$TEXT_REMOVE_ELEMENT}"><img src="images/icons/delete.gif" border="0" /></a></td>
				</tr>
				</table>
			{else}
				{$field.input}
			{/if}
			
			{if $field.type == 'datetime'}
			<script language="javascript">dbformDate{$field.name}.writeControl(); dbformDate{$field.name}.dateFormat="yyyy-MM-dd";</script>
			{draw_hour_input field_name=$field.name value=$field.value|date_format:"%H" css_class="dbforminput"}
			:{draw_minute_input field_name=$field.name value=$field.value|date_format:"%M" css_class="dbforminput"}
			{/if}

			{if $field.helper}
			{include file=$field.helper}
			{/if}
			
			{if $field.maxlength>0 or $field.minlength>0}
			<br />
			{/if}
			{if $field.maxlength>0}{$MAXLENGTH_STRING} {$field.maxlength}<br />{/if}
			{if $field.minlength>0}{$MINLENGTH_STRING} {$field.minlength}<br />{/if}
			{if $field.comments}{$field.comments}{/if}

		</div>
		<div id="dbform_row_required">
			{if $field.required}{$REQUIRED_STRING}{else}&nbsp;{/if}
		</div>
		<div style="clear:both;"></div>
	</div>
	{/if}
