<div class="adminnavi">
  <a href="./index.php"><{$module->getShow('name')}></a>
  &raquo;&raquo; <a href="./index.php?op=CategoryList"><{$smarty.const._MI_MYUPLOADER_LANG_CATEGORY_LIST}></a>
  <{if $actionForm->get('category_id')}>
    &raquo;&raquo; <{$smarty.const._AD_MYUPLOADER_LANG_CATEGORY_EDIT}>
  <{else}>
    &raquo;&raquo; <{$smarty.const._AD_MYUPLOADER_LANG_ADD_A_NEW_CATEGORY}>
  <{/if}>
</div>

  <{if $actionForm->get('category_id')}>
    <h3><{$smarty.const._AD_MYUPLOADER_LANG_CATEGORY_EDIT}></h3>
  <{else}>
    <h3><{$smarty.const._MI_MYUPLOADER_LANG_ADD_A_NEW_CATEGORY}></h3>
  <{/if}>

<{if $actionForm->hasError()}>
  <div class="error">
    <ul>
      <{foreach item=message from=$actionForm->getErrorMessages()}>
        <li><{$message|xoops_escape}></li>
      <{/foreach}>
    </ul>
  </div>
<{/if}>
<form action="index.php?op=CategoryEdit" method="post">
  <{xoops_token form=$actionForm}>
  <{xoops_input type=hidden name=category_id value=$actionForm->get('category_id')}>
  <table class="outer">
    <tr>
    <{if $actionForm->get('category_id')}>
      <th colspan="2"><{$smarty.const._AD_MYUPLOADER_LANG_CATEGORY_EDIT}></th>
  <{else}>
      <th colspan="2"><{$smarty.const._MD_MYUPLOADER_LANG_ADD_A_NEW_CATEGORY}></th>
  <{/if}>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_NAME}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=cat_name value=$actionForm->get('cat_name') size=15 maxlength=100}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CATEGORY_PARENT}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name="cat_pid">
		<option value="0"><{$smarty.const._MD_MYUPLOADER_LANG_PARENT_TOP}></option>
        <{html_options options=$categoryTree selected=$actionForm->get('cat_pid')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_VIEWGROUPS}></td>
      <td class="<{cycle values="odd,even"}>">
        <select size="3" name="cat_viewgroups[]" multiple="multiple">
        <{xoops_optionsArray from=$groupObjs default=$actionForm->get('cat_viewgroups') label="name" value="groupid"}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_UPLOADGROUPS}>
      <td class="<{cycle values="odd,even"}>">
        <select size="3" name="cat_uploadgroups[]" multiple="multiple">
        <{xoops_optionsArray from=$groupObjs default=$actionForm->get('cat_uploadgroups') label="name" value="groupid"}>
        </select>
	<tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_HTMLALLOWED_GROUPS}>
      <td class="<{cycle values="odd,even"}>">
        <select size="3" name="cat_htmlallowedgroups[]" multiple="multiple">
        <{xoops_optionsArray from=$groupObjs default=$actionForm->get('cat_htmlallowedgroups') label="name" value="groupid"}>
        </select>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_DESCRIPTION}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_dhtmltarea type=text name=cat_description value=$actionForm->get('cat_description')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_MAXSIZE}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=cat_maxsize value=$actionForm->get('cat_maxsize')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_MAXLENGTH}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=cat_maxlength value=$actionForm->get('cat_maxlength')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_RESIZELENGTH}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=cat_resizelength value=$actionForm->get('cat_resizelength')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_THUMBLENGTH}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=cat_thumblength value=$actionForm->get('cat_thumblength')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_ACTIVE}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=checkbox name=cat_active value=1 default=$actionForm->get('cat_active')}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._MD_MYUPLOADER_LANG_CAT_WEIGHT}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=cat_weight value=$actionForm->get('cat_weight')}>
      </td>
    </tr>
    <tr>
      <td class="foot" colspan="2">
        <input type="submit" class="formButton" value="<{$smarty.const._SUBMIT}>"/>
        <input type="submit" class="formButton" value="<{$smarty.const._MD_MYUPLOADER_LANG_CANCEL}>" name="_form_control_cancel"/>
      </td>
    </tr>
  </table>
</form>
