{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$form.back}">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$lang.distance.editform}</div>
<div class="cr">&nbsp;</div>
<div class="cr">&nbsp;</div>
<div class="help_text" style="display:block;">
    <div class="close_help">
        <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
    </div>
    <div class="help_body">
        <span class="help_title">{$lang.help}:</span>{if $form.par eq "edit"}{$lang.admin_help.ref_distances_edit}{else}{$lang.admin_help.ref_distances_add}{/if}
    </div>
</div>
<div class="cr">&nbsp;</div>


				<table border=0 cellspacing=1 cellpadding=5 width="100%">
                <form method="post" action="{$form.action}"  enctype="multipart/form-data" name="types_form">
                {$form.hiddens}
					<tr bgcolor="#FFFFFF">
                        <td align="right" width="15%" class="main_header_text">{$lang.distance.name}:&nbsp;</td>
                        <td class="main_content_text" align="left" ><input type="text" name="name" value="{$data.name}" size=10></td>
                        <td class="main_header_text" align="left" width="70%">&nbsp;</td>
					</tr>
					<tr bgcolor="#FFFFFF">
                        <td align="right" width="15%" class="main_header_text">{$lang.distance.type}:&nbsp;</td>
                        <td class="main_content_text" align="left">
                        <select name="type">
				<option value="mile" {if $data.type == "mile"}selected{/if}>{$lang.distance.mile}</option>
				<option value="km" {if $data.type == "km"}selected{/if}>{$lang.distance.km}</option>
			</select>
			</td>
                         <td class="main_header_text" align="left" width="70%">&nbsp;</td>
                   </tr>
                    </form>
            </table>
			<table><tr height="40">
			{if $form.par eq "edit"}
			<td><a class="admin_button_major" onclick="javascript:document.types_form.submit();">{$lang.button.save}<span>&nbsp;</span></a></td>
			<td><a class="admin_button_major" onclick="{literal}javascript: if(confirm({/literal}'{$form.confirm|escape:javascript}'{literal})){location.href={/literal}'{$form.delete}'{literal}}{/literal}">{$lang.button.delete}<span>&nbsp;</span></a></td>
			{else}
			<td>
                <a class="admin_button_major" onclick="javascript:document.types_form.submit();">{$lang.button.add}<span>&nbsp;</span></a>
            </td>
			{/if}
			</tr></table>

{include file="$admingentemplates/admin_bottom.tpl"}