<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_BASE_NAME}></a>
  &raquo;&raquo; <a href="./index.php?action=BlockList"><{$smarty.const._MI_BASE_MENU_BLOCKLIST}></a>
  <{if $actionForm->getVar('content')}>
    <{if $object->getVar('visible') == 1 }>
      &raquo;&raquo; <{$smarty.const._AD_BASE_LANG_CUSTOMBLOCK_EDIT}>
    <{else}>
      &raquo;&raquo; <{$smarty.const._AD_BASE_LANG_BLOCK_INSTALL}>
    <{/if}>
  <{else}>
    &raquo;&raquo; <{$smarty.const._AD_BASE_LANG_ADD_CUSTOM_BLOCK}>
  <{/if}>
</div>

<h3>
  <{if $actionForm->getVar('content')}>
    <{if $object->getVar('visible') == 1 }>
      <{$smarty.const._AD_BASE_LANG_CUSTOMBLOCK_EDIT}>
    <{else}>
      <{$smarty.const._AD_BASE_LANG_BLOCK_INSTALL}>
    <{/if}>
  <{else}>
    <{$smarty.const._AD_BASE_LANG_ADD_CUSTOM_BLOCK}>
  <{/if}>
</h3>

<{if $actionForm->hasError()}>
  <ul>
    <{foreach item=message from=$actionForm->getErrorMessages()}>
      <li><{$message|escape}></li>
    <{/foreach}>
  </ul>
<{/if}>

<form action="index.php?action=CustomBlockEdit" method="post">
  <{xoops_token form=$actionForm}>
  <{xoops_input type=hidden name=bid value=$actionForm->getVar('bid')}>
  <table class="outer">
    <tr>
      <th colspan="2">
        <{if $actionForm->getVar('content')}>
          <{if $object->getVar('visible') == 1 }>
            &raquo;&raquo; <{$smarty.const._AD_BASE_LANG_CUSTOMBLOCK_EDIT}>
          <{else}>
            &raquo;&raquo; <{$smarty.const._AD_BASE_LANG_BLOCK_INSTALL}>
          <{/if}>
        <{else}>
          <{$smarty.const._AD_BASE_LANG_ADD_CUSTOM_BLOCK}>
        <{/if}>
      </th>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_TITLE}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=title value=$actionForm->getVar('title') size=50 maxlength=255}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_SIDE}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name="side">
          <{xoops_optionsArray from=$columnSideArr label=name value=id default=$actionForm->get('side')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_WEIGHT}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_input type=text name=weight value=$actionForm->getVar('weight') size=5}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_CONTENT}></td>
      <td class="<{cycle values="odd,even"}>">
        <{xoops_dhtmltarea type=text name=content value=$actionForm->getVar('content') rows=20 cols=60}>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_C_TYPE}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name='c_type'>
          <{xoops_optionsArray from=$ctypeArr value=type label=label default=$actionForm->get('c_type')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_BCACHETIME}></td>
      <td class="<{cycle values="odd,even"}>">
        <select name='bcachetime'>
          <{xoops_optionsArray from=$cachetimeArr value=cachetime label=label default=$actionForm->get('bcachetime')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_TARGET_MODULES}></td>
      <td class="<{cycle values="odd,even"}>">
        <select  size='5' name='bmodule[]' multiple='multiple'>
          <{xoops_optionsArray from=$moduleArr value=mid label=name default=$actionForm->get('bmodule')}>
        </select>
      </td>
    </tr>
    <tr>
      <td class="head"><{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}></td>
      <td class="<{cycle values="odd,even"}>">
        <select  size='5' name='groupid[]' multiple='multiple'>
          <{xoops_optionsArray from=$groupArr value=groupid label=name default=$actionForm->get('groupid')}>
        </select>
      </td>
    </tr>
    <tr class="foot">
      <td colspan="2">
        <input class="formButton" type="submit" value="<{$smarty.const._SUBMIT}>" />
        <input type="button" value="<{$smarty.const._BACK}>" onclick="javascript:history.back()" class="formButton" />
      </td>
    </tr>
  </table>
</form>
