<!-- {include file="header.html"} -->
<div id="currentPosition">
 <p>{lang your_current_position} {lang trade_management} &raquo; {lang product_center}</p>
</div>
<div id="rightTop"> 
    <h3>{lang product_center}</h3> 
    <ul class="subnav">
		<li><a href="product.php">{lang management}</a></li>
		<li><a href="productsort.php">{lang category}</a></a></li>
        <li><a href="productcategory.php">{lang product}{lang sorts}</a></li>
        <li><a class="btn1" href="productcategory.php?do=edit"><span>{lang add_or_edit}</span></a></li>
		<li><a href="brand.php">{lang brands}</a></a></li>
		<li><a href="brandtype.php">{lang brands}{lang sorts}</a></a></li>
		<li><a href="price.php">{lang prices}</a></a></li>
    </ul>
</div>
<div class="info">
  <form method="post" action="productcategory.php" id="EditFrm" name="edit_frm">
  <input type="hidden" name="id" value="{$item.id}" />
  <input type="hidden" name="page" value="{$smarty.get.page}" />
    <table class="infoTable">
      <tr>
        <th class="paddingT15"> {lang add_method}</th>
        <td class="paddingT15 wordSpacing5">
		<select name="data[method]" id="DataMethod">
			<option value="1">{lang add_one_by_one}</option>
			<option value="2">{lang copy_from_the_industry_classification}</option>
        </select></td>
      </tr>
	  <tbody id="DataMethod1">
	    {if $smarty.get.id}
      <input type="hidden" name="id" value="{$smarty.get.id}" />
      <input type="hidden" name="page" value="{$smarty.request.page}" />
      <tr>
        <th class="paddingT15"> {lang sorts}{lang colon}</th>
        <td class="paddingT15 wordSpacing5"><input class="infoTableInput2" name="data[productcategory][name]" value="{$item.name}" type="text" /><label class="field_notice">{lang top_category_name_not_support_special_sign}</label>        </td>
      </tr>
    {else}
	      <tr>
        <th class="paddingT15"> {lang sorts}{lang colon}</th>
        <td class="paddingT15 wordSpacing5"><textarea name="data[productcategory][name]" id="dataNames"></textarea></td>
      </tr>
    {/if}      
      <tr>
        <th class="paddingT15"> {lang parent_categories}{lang colon}</th>
        <td class="paddingT15 wordSpacing5">
        <select name="data[productcategory][parent_id]" id="ProductcategorytypeParentId">
        <option value="0">{lang top_categories}</option>
        {$ProductcategoryOptions}
        </select>
        </td>
      </tr>
	  </tbody>
	  <tbody id="DataMethod2" style="display:none;">
      <tr>
        <th class="paddingT15"> {lang whether_or}{lang overcast}{lang colon}</th>
        <td class="paddingT15 wordSpacing5"><!--{html_radios name="data[coverage]" options=$AskAction checked=1 separator=""}--><label class="field_notice">{lang if_choose_not_disorders_may_lead_to}</label></td>
      </tr>      
      <tr>
        <th class="paddingT15"> {lang whether_or}{lang empty}{lang colon}</th>
        <td class="paddingT15 wordSpacing5"><!--{html_radios name="data[truncate]" options=$AskAction checked=0 separator=""}--></td>
      </tr>      
	  </tbody>
      <tr>
        <th></th>
        <td class="ptb20">
			<input class="formbtn" type="submit" name="save" value="{lang save_and_pub}" />		</td>
      </tr>
    </table>
  </form>
</div>
<script>
var parent_id = "{$item.parent_id|default:0}";
</script>
<!--{literal}-->
<script>
jQuery(document).ready(function($) {
	$("#ProductcategorytypeParentId option[value='"+parent_id+"']").attr("selected","selected")
	$("#DataMethod").change( function() { 
		$("#DataMethod1, #DataMethod2").toggle();
	} 
	);
})
</script>
<!--{/literal}-->
<!-- {include file="footer.html"} -->