<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Fields_Add.aspx.cs" Inherits="TotCms.Web.Admin.Fields_Add" %>

<%@ Register src="UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>添加自定义字段</title>
  <link href="style/global.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="js/common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <uc1:main_top ID="main_top1" runat="server" /></div>
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="black_border">
      <tr class="suphead">
        <td colspan="2">
                    添加自定义字段</td>
    </tr>
    <tr>
      <td class="fields_text">
          内容模型：</td>
      <td class="fields_input">
          <asp:DropDownList ID="DataModule" runat="server">
          </asp:DropDownList>          
          选择要添加自定义字段的内容模型</td>
    </tr>
    <tr>
      <td class="fields_text">
          字段名称：</td>
      <td class="fields_input">
        <asp:TextBox ID="FieldName" runat="server" CssClass="input_middle"></asp:TextBox>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
              ControlToValidate="FieldName" ErrorMessage="只能使用数字和字母" 
              ValidationExpression="\w+"></asp:RegularExpressionValidator>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
              ControlToValidate="FieldName" ErrorMessage="字段名称不能为空"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          字段说明：</td>
      <td class="fields_input">
        <asp:TextBox ID="FieldTitle" runat="server" CssClass="input_middle"></asp:TextBox>
          &nbsp;
          <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
          ControlToValidate="FieldTitle" ErrorMessage="字段说明不能为空"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          字段类型：</td>
      <td class="fields_input">
          <asp:DropDownList ID="FieldType" runat="server">
          </asp:DropDownList>
          长度：<asp:TextBox ID="FieldLen" runat="server">50</asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          表单类型：</td>
      <td class="fields_input">
          <asp:DropDownList ID="FormType" runat="server">
          </asp:DropDownList>
                </td>
    </tr>
    <tr>
      <td class="fields_text">
          表单名称：</td>
      <td class="fields_input">
          <asp:TextBox ID="FormText" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
              ControlToValidate="FormText" ErrorMessage="请填写表单名称"></asp:RequiredFieldValidator>
                </td>
    </tr>
    <tr>
      <td class="fields_text">表单默认值：</td>
      <td class="fields_input">
          <asp:TextBox ID="FormDefault" runat="server" CssClass="text_content_default" 
              TextMode="MultiLine"></asp:TextBox>
                <br />
          多个值以回车分隔(比如在下拉列表、多选等表单中)</td>
    </tr>
    <tr>
      <td class="fields_text">绑定表数据：</td>
      <td class="fields_input">
          <asp:CheckBox ID="cbIsBindTable" runat="server" Text="绑定表中数据" />
          <br />
          选择表：<asp:DropDownList ID="ddTable" runat="server" 
            AutoPostBack="True" onselectedindexchanged="ddTable_SelectedIndexChanged">
          </asp:DropDownList>
          <br />
          值字段：<asp:DropDownList ID="ddValueFields" runat="server">
          </asp:DropDownList>
          <br />
          文本字段：<asp:DropDownList ID="ddTextFields" runat="server">
          </asp:DropDownList>
      </td>
    </tr>
    <tr>
      <td class="fields_text">是否列表页显示：</td>
      <td class="fields_input">
          <asp:CheckBox ID="cbShowInList" runat="server" Text=" " />
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <asp:Button ID="Button1" runat="server" Text="添 加" onclick="Button1_Click" />
        <input id="Button2" type="reset" value="取 消" /></td>
    </tr>
  </table>
    </form>
</body>
</html>
