{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$form.back}">{$lang.button.back}</a>
</div>
<font class=red_header>{$header.razdel_name}</font>
<div class="cr">&nbsp;</div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="help_text" style="padding:5px;">
    <div class="close_help">
		<img src="{$site_root}{$template_root}/images/close_help.png" alt="">
	</div>
	<span class="help_title">{$lang.help}:</span>{if $form.par eq "edit"}{$help.gs_category_edit}{else}{$help.gs_category_add}{/if}
</div>
<div id="tooltip" onclick="hideToolTip()" style="text-align:center; background-color: #FFFFFF; border: 1px dotted; text-align: {$default_left}; position:absolute; display:none; padding:5px;"></div>
{literal}
<script type="text/javascript">
$(function() {
$('#tool_tip_4 *').tooltip();
});
</script>
{/literal}
<div class="panel_section">
<div class="panel_content" style="width:60%;">
            <table border=0 cellspacing=0 cellpadding=0 width="100%">
                <form method="post" action="{$form.action}"  enctype="multipart/form-data" name="subcat_form">
                {$form.hiddens}
					<tr>
                        <td valign="top" align="left" width="17%" class="main_header_text" style="padding-top: 5px;">{$header.name}<font class=main_error_text>*</font>:&nbsp;</td>
                        <td valign="top" class="main_content_text" align="left" style="padding-top:5px;"><input type="text" name="name" value="{$data.name}" size=30  style="width: 300"></td>
                        <td valign="top" class="main_header_text" align="left" width="65%" style="padding-top: 5px;">&nbsp;{$header.status}&nbsp;<input type="checkbox" name="status" value="1" {if $data.status}checked{/if} ></td>
                    </tr>
					<tr>
                        <td valign="top" align="left" width="17%" class="main_header_text" style="padding-top: 5px;">{$header.comment}:&nbsp;</td>
                        <td colspan=2 valign="top" class="main_content_text" align="left" style="padding-top:5px;"><textarea name="comment"  style="width: 300; height: 200">{$data.comment}</textarea></td>
                    </tr>
					<tr>
                        <td valign="top" align="left" width="17%" class="main_header_text" style="padding-top: 5px;">{$header.sorter}:&nbsp;</td>
                        <td colspan=2 valign="top" class="main_content_text" align="left" style="padding-top:5px;">
                        <select name="sorter">
						{section name=s loop=$sorter}
							<option value="{$smarty.section.s.index_next}" {if $sorter[s].sel}selected{/if}>{$smarty.section.s.index_next}</option>
						{/section}
						</select>
						</td>
                   </tr>
					<tr>
                        <td valign="top" align="left" width="17%" class="main_header_text" style="padding-top: 5px;">{$header.icon}:&nbsp;</td>
                        <td colspan=2 class="main_content_text" align="left" style="padding-top:5px;"><input type="file"  name="icon"></td>
                    </tr>
					{if $data.icon_path}
                    <tr height="20">
			<td>&nbsp;</td>
                        <td colspan=2 class="main_content_text" align="left"><img src="{$data.icon_path}" border=1 vspace="5">
							<a href="#" class="admin_button" onclick="javascript: document.subcat_form.picdel.value = '1'; document.subcat_form.submit();">{$button.delete}<span>&nbsp;</span></a>
						</td>
                    </tr>
					{/if}
                    </form>
            </table>
</div></div>
			<table width="100%"><tr height="40">
			{if $form.par eq "edit"}
			{if $data.root  ne 1}<td><a href="#" class="admin_button_major" onclick="javascript:document.subcat_form.submit()" href="#">{$button.save}<span>&nbsp;</span></a></td>
			<td align="right"><a href="#" class="admin_button" onclick="{literal}javascript: if(confirm({/literal}'{$form.confirm}'{literal})){location.href={/literal}'{$form.delete}'{literal}}{/literal}">{$button.delete}<span>&nbsp;</span></a></td>{/if}
			{else}
			<td><a href="#" class="admin_button_major" onclick="javascript:document.subcat_form.submit()">{$button.add}<span>&nbsp;</span></a></td>
			{/if}
{*			<td><a href="#" class="admin_button" onclick="javascript: location.href='{$form.back}'">{$button.back}<span>&nbsp;</span></a></td>*}
			</tr></table>
{include file="$admingentemplates/admin_bottom.tpl"}