{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.admin_menu.profile_fields}</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>{$lang.builder.help_edit}
    </div>
</div>
<form method="post" action="admin_reference.php"  enctype="multipart/form-data" name="types_form">
<input type="hidden" name="sel" value="savecust">
<input type="hidden" name="ref" value="{$ref}">
<input type="hidden" name="page" value="{$page}">
<input type="hidden" name="id" value="{$id}">

{strip}
<table border=0 cellspacing=1 cellpadding=5 width="100%">
    <tr bgcolor="#FFFFFF">
        <td align="left" width="15%" class="main_header_text">{$lang.ref.field}&nbsp;</td>
        <td class="main_content_text" align="left" >
            {assign var="name_for_lang" value=$types.name_for_lang}
            <input type="text" name="name" value='{if $lang.userspr[$name_for_lang] ne ''}
                                                    {$lang.userspr[$name_for_lang]}
                                                  {else}
                                                    {if $lang.profile[$name_for_lang] ne ''}
                                                        {$lang.profile[$name_for_lang]}
                                                    {else}
                                                        {$types.name_for_lang}
                                                    {/if}
                                                  {/if}' size=30>
        </td>
        <td class="main_header_text" align="left" width="70%">&nbsp;</td>
    </tr>
</table>
{/strip}
</form>

<table width="100%"><tr height="40">
{if $edit eq 1}
	<td><a href="#" class="admin_button_major" onclick="javascript:document.types_form.submit();">{$lang.button.save}<span>&nbsp;</span></a>
	<a href="#" style="float:right;" class="admin_button" 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 href="#" class="admin_button_major" onclick="javascript:document.types_form.submit();">{$lang.button.add}<span>&nbsp;</span></a>
	</td>
{/if}
{*    <td><input type="button" value="{$lang.button.back}" class="button" onclick="javascript: location.href='{$form.back}'"></td>*}
</tr></table>

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