{include file="head.html"}
<div id="maincontent">
  <div class="wrap"><br />
    <form action="__URL__/manage_add" id="form" method="post">
      <div class="infobox">
        <h3>{lang='添加字段'}</h3>
        <table class="form-table table_style">
          <tr>
            <td width="100">{lang='字段描述'}：</td>
            <td><input class="regular-text" type='text' id="name" name="name" reg="." tip="{lang='模型中文标识'}" /></td>
          </tr>
          <tr>
            <td width="100">{lang='字段名'}：</td>
            <td><input class="regular-text" type='text' id="field" name="field" reg="^\w+$" tip="{lang='只允许英文数字和下划线'}" /></td>
          </tr>
          <tr>
            <td width="100">{lang='字段类型'}：</td>
            <td>
            <select name="type" id="type">
              <option value="1"><?php echo module('common')->getlang('单行文本') ?></option>
              <option value="2"><?php echo module('common')->getlang('多行文本') ?></option>
              <option value="3"><?php echo module('common')->getlang('编辑器') ?></option>
              <option value="4"><?php echo module('common')->getlang('下拉列表') ?></option>
              <option value="5"><?php echo module('common')->getlang('上传框') ?></option>
              <option value="6"><?php echo module('common')->getlang('数字') ?></option>
              <option value="7"><?php echo module('common')->getlang('货币(保留2位小数)') ?></option>
              <option value="8"><?php echo module('common')->getlang('时间') ?></option>
            </select>
            </td>
          </tr>
          <tr>
            <td width="100">{lang='默认值'}：</td>
            <td>
            <textarea name="default_val" id="default_val" cols="0" class="regular-textarea" style="width:300px !important; height:80px"></textarea> <br />
{lang='如果为下拉列表则一行一个数值与描述以英文模式逗号分割。'}
            </td>
          </tr>
        </table>
      </div>
      <div class="submit_body">
        <input name="psot_do" id="psot_do" type="hidden" value="yes" />
        <input name="pid" id="pid" type="hidden" value="{$info['id']}" />
        <button class="regular-button" type="button" onclick="post()">{lang='添加'}</button>
      </div>
    </form>
  </div>
</div>
</body></html>