<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_LEGACY_NAME}></a>
  &raquo;&raquo; <a href="./index.php?action=BlockList"><{$smarty.const._MI_LEGACY_MENU_BLOCKLIST}></a>
  <{if $actionForm->get('content')}>
    <{if $object->get('visible') == 1 }>
      &raquo;&raquo; <span class="adminnaviTitle"><{$smarty.const._AD_LEGACY_LANG_CUSTOMBLOCK_EDIT}></span>
    <{else}>
      &raquo;&raquo; <span class="adminnaviTitle"><{$smarty.const._AD_LEGACY_LANG_BLOCK_INSTALL}></span>
    <{/if}>
  <{else}>
    &raquo;&raquo; <span class="adminnaviTitle"><{$smarty.const._AD_LEGACY_LANG_ADD_CUSTOM_BLOCK}></span>
  <{/if}>
</div>

<h3 class="admintitle">
  <{if $actionForm->get('content')}>
    <{if $object->get('visible') == 1 }>
      <{$smarty.const._AD_LEGACY_LANG_CUSTOMBLOCK_EDIT}>
    <{else}>
      <{$smarty.const._AD_LEGACY_LANG_BLOCK_INSTALL}>
    <{/if}>
  <{else}>
    <{$smarty.const._AD_LEGACY_LANG_ADD_CUSTOM_BLOCK}>
  <{/if}>
</h3>

<{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?action=CustomBlockEdit" method="post">
  <{xoops_token form=$actionForm}>
  <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}>
  <table class="outer">
    <tr>
      <th colspan="2">
        <{if $actionForm->get('content')}>
          <{if $object->get('visible') == 1 }>
            <{$smarty.const._AD_LEGACY_LANG_CUSTOMBLOCK_EDIT}>
          <{else}>
            <{$smarty.const._AD_LEGACY_LANG_BLOCK_INSTALL}>
          <{/if}>
        <{else}>
          <{$smarty.const._AD_LEGACY_LANG_ADD_CUSTOM_BLOCK}>
        <{/if}>
      </th>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_TITLE}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=title value=$actionForm->get('title') size=50 maxlength=255}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_SIDE}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name="side">
          <{xoops_optionsArray id=side from=$columnSideArr label=name value=id default=$actionForm->get('side')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_WEIGHT}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=weight value=$actionForm->get('weight') size=5 class=legacy_list_number}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_CONTENT}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_dhtmltarea type=text name=content value=$actionForm->get('content') rows=20 cols=60}>
        <{* fck_htmlarea name=content width=100% hight=400px
skin=silver value=$actionForm->get('content') *}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_C_TYPE}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name='c_type'>
          <{xoops_optionsArray id=c_type from=$ctypeArr value=type label=label default=$actionForm->get('c_type')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_BCACHETIME}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name='bcachetime'>
          <{xoops_optionsArray id=bcachetime from=$cachetimeArr value=cachetime label=label default=$actionForm->get('bcachetime')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_TARGET_MODULES}></td>
      <td class="<{cycle values="odd,even"}>">
        <select  size='5' name='bmodule[]' multiple='multiple'>
          <{if $actionForm->get('bmodule')}>
            <{xoops_optionsArray id=bmodule[] from=$moduleArr value=mid label=name default=$actionForm->get('bmodule')}>
          <{else}>
            <{xoops_optionsArray id=bmodule[] from=$moduleArr value=mid label=name default=-1}>
          <{/if}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_LEGACY_LANG_TARGET_GROUPS}></td>
      <td class="<{cycle values="odd,even"}>">
        <select  size='5' name='groupid[]' multiple='multiple'>
          <{if $actionForm->get('groupid')}>
            <{xoops_optionsArray id=groupid[] from=$groupArr value=groupid label=name default=$actionForm->get('groupid')}>
          <{else}>
            <{xoops_optionsArray id=groupid[] from=$groupArr value=groupid label=name default=1}>
          <{/if}>
        </select>
      </td>
    </tr>
    <tr>
      <td colspan="2" class="foot">
        <input class="formButton" type="submit" value="<{$smarty.const._SUBMIT}>" />
        <input class="formButton" type="submit" value="<{$smarty.const._BACK}>" name="_form_control_cancel" />
      </td>
    </tr>
  </table>
</form>
