<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_InfoModel_SetModelField, QianboCMS" EnableEventValidation="false" %>
<!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 runat="server">
<title>设置字段</title>
<link href="../Css/layout.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../../Js/jquery.js"></script>
<script type="text/javascript" src="../../Js/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript" src="../../Js/Common.js"></script>
<script type="text/javascript" src="../../Js/ModelField.js"></script>
</head>

<body onLoad="SelectModelType()">
<form id="form1" runat="server">
  <table width="99%" cellspacing="1" cellpadding="0" class="wzdh" align="center">
    <tr>
      <td style="padding-left: 10px;"><img src="../Images/Skin/Default/you.gif" align="absmiddle" /> 您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt;
        <asp:Literal ID="ModelOrExtend" runat="server"></asp:Literal></td>
    </tr>
  </table>
  <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center">
    <tr class="tdbg">
      <td class="bqleft">字段别名：</td>
      <td class="bqright"><asp:TextBox ID="Alias" runat="server" MaxLength="20"></asp:TextBox>
        <font color="red">*</font>
        <span class="tips">如：文章标题</span></td>
    </tr>
    <tr class="tdbg">
      <td class="bqleft">字段名称：</td>
      <td class="bqright"><asp:TextBox ID="Name" MaxLength="50" runat="server"></asp:TextBox>
        <font color="red">*</font>
        <span class="tips">由字母、数字、下划线组成 如：Title</span></td>
    </tr>
    <tr class="tdbg">
      <td class="bqleft">字段描述：</td>
      <td class="bqright"><asp:TextBox ID="Description" runat="server" Columns="65" Rows="6" TextMode="MultiLine"></asp:TextBox></td>
    </tr>
    <tr class="tdbg">
      <td class="bqleft">是否必填：</td>
      <td class="bqright"><asp:RadioButtonList ID="IsNotNull" runat="server" RepeatDirection="Horizontal">
          <asp:ListItem Value="True">是</asp:ListItem>
          <asp:ListItem Selected="True" Value="False">否</asp:ListItem>
        </asp:RadioButtonList></td>
    </tr>
    <tr class="tdbg">
      <td class="bqleft">字段类型：</td>
      <td class="bqright"><asp:RadioButtonList ID="Type" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" onclick="SelectModelType()">
          <asp:ListItem Value="TextType" Selected="True">单行文本</asp:ListItem>
          <asp:ListItem Value="MultipleTextType">多行文本(不支持Html)</asp:ListItem>
          <asp:ListItem Value="MultipleHtmlType">多行文本(支持Html)</asp:ListItem>
          <asp:ListItem Value="RadioType">单选项</asp:ListItem>
          <asp:ListItem Value="ListBoxType">多选项</asp:ListItem>
          <asp:ListItem Value="DateType">日期时间</asp:ListItem>
          <asp:ListItem Value="PicType">图片</asp:ListItem>
          <asp:ListItem Value="FileType">文件</asp:ListItem>
          <asp:ListItem Value="NumberType">数字</asp:ListItem>
          <asp:ListItem Value="RadomType">随机数</asp:ListItem>
          <asp:ListItem Value="ErLinkageType">二级联动</asp:ListItem>
        </asp:RadioButtonList></td>
    </tr>
    <tbody id="DivTextType">
      <tr>
        <td class="bqleft">文本框长度：</td>
        <td class="bqright"><asp:TextBox ID="TitleSize" runat="server" Columns="10" MaxLength="4">35</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">是否为密码：</td>
        <td class="bqright"><asp:RadioButtonList ID="IsPassword" runat="server" RepeatDirection="Horizontal" CssClass="input1">
            <asp:ListItem Value="password">是</asp:ListItem>
            <asp:ListItem Selected="True" Value="text">否</asp:ListItem>
          </asp:RadioButtonList></td>
      </tr>
      <tr>
        <td class="bqleft">默认值：</td>
        <td class="bqright"><asp:TextBox ID="TextType_DefaultValue" runat="server" Columns="10"></asp:TextBox></td>
      </tr>
    </tbody>
    <tbody id="DivMultipleTextType" style="display: none;">
      <tr>
        <td class="bqleft">显示宽度：</td>
        <td class="bqright"><asp:TextBox ID="MultipleTextType_Width" runat="server" Columns="10" MaxLength="4">500</asp:TextBox>
          px</td>
      </tr>
      <tr>
        <td class="bqleft">显示高度：</td>
        <td class="bqright"><asp:TextBox ID="MultipleTextType_Height" runat="server" Columns="10" MaxLength="4">200</asp:TextBox>
          px</td>
      </tr>
    </tbody>
    <tbody id="DivMultipleHtmlType" style="display: none;">
      <tr>
        <td class="bqleft">编辑器类型：</td>
        <td class="bqright"><asp:DropDownList ID="IsEditor" runat="server">
            <asp:ListItem Value="1">简洁型编辑器</asp:ListItem>
            <asp:ListItem Value="2">标准型编辑器</asp:ListItem>
            <asp:ListItem Value="3">增强型编辑器</asp:ListItem>
          </asp:DropDownList></td>
      </tr>
      <tr>
        <td class="bqleft">显示宽度：</td>
        <td class="bqright"><asp:TextBox ID="MultipleHtmlType_Width" runat="server" Columns="10" MaxLength="4">715</asp:TextBox>
          px</td>
      </tr>
      <tr>
        <td class="bqleft">显示高度：</td>
        <td class="bqright"><asp:TextBox ID="MultipleHtmlType_Height" runat="server" Columns="10" MaxLength="4">400</asp:TextBox>
          px</td>
      </tr>
    </tbody>
<script type="text/javascript">
var jq = jQuery.noConflict();
jQuery(function(){
    jQuery('#Button3').click(function(){
        jQuery.dialog({
            id: 'txtRadioType_SelectName',
            lock: true,
            title: '从数据字典中选择选项',
            content: "url:SelectDictionary.aspx?ControlId=RadioType_SelectName&TypeId=3",
            width: 800,
            height: 500
        });
    });
    jQuery('#Button7').click(function(){
        jQuery.dialog({
            id: 'txtRadioType_SelectName',
            lock: true,
            title: '从属性表中选择选项',
            content: "url:SelectProperty.aspx?ControlId=RadioType_SelectName&TypeId=3",
            width: 800,
            height: 500
        });
    });
    jQuery('#Button4').click(function(){
        jQuery.dialog({
            id: 'txtListBoxType_SelectName',
            lock: true,
            title: '从数据字典中选择选项',
            content: "url:SelectDictionary.aspx?ControlId=ListBoxType_SelectName&TypeId=3",
            width: 800,
            height: 500
        });
    });
    jQuery('#Button8').click(function(){
        jQuery.dialog({
            id: 'txtListBoxType_SelectName',
            lock: true,
            title: '从属性表中选择选项',
            content: "url:SelectProperty.aspx?ControlId=ListBoxType_SelectName&TypeId=3",
            width: 800,
            height: 500
        });
    });
    jQuery('#Button5').click(function(){
        jQuery.dialog({
            id: 'txtErLinkage_Value',
            lock: true,
            title: '从数据字典中选择选项',
            content: "url:SelectDictionary.aspx?ControlId=ErLinkage_Value&TypeId=2",
            width: 800,
            height: 500
        });
    });
    jQuery('#Button9').click(function(){
        jQuery.dialog({
            id: 'txtErLinkage_Value',
            lock: true,
            title: '从属性表中选择选项',
            content: "url:SelectProperty.aspx?ControlId=ErLinkage_Value&TypeId=2",
            width: 800,
            height: 500
        });
    });
    jQuery('#Button6').click(function(){
        jQuery.dialog({
            id: 'txtSanLinkage_Value',
            lock: true,
            title: '从数据字典中选择分类',
            content: "url:SelectDictionary.aspx?ControlId=SanLinkage_Value&TypeId=2",
            width: 800,
            height: 500
        });
    });
});
</script>
    <tbody id="DivRadioType" style="display: none;">
      <tr>
        <td class="bqleft">单选项值：</td>
        <td class="bqright"><asp:TextBox ID="RadioType_SelectName" runat="server"></asp:TextBox>
          <input id="Button3" type="button" value="从数据字典中选择选项" class="btn" />
          <input id="Button7" type="button" value="从属性表中选择选项" class="btn" />
          <asp:TextBox ID="RadioType_SelectName_Id" runat="server" Style="display: none;"></asp:TextBox>
          <asp:TextBox ID="RadioType_SelectName_Property" runat="server" Style="display: none;"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">默认值：</td>
        <td class="bqright"><asp:TextBox ID="RadioType_Default" runat="server"></asp:TextBox>
          注：没有数据录入时的默认值，与前台显示无关。</td>
      </tr>
      <tr>
        <td class="bqleft">显示选项：</td>
        <td class="bqright"><asp:RadioButtonList ID="RadioType_Type" runat="server">
            <asp:ListItem Selected="True" Value="1">单选下拉列表框</asp:ListItem>
            <asp:ListItem Value="2">单选按钮</asp:ListItem>
            <asp:ListItem Value="3">弹出窗口</asp:ListItem>
          </asp:RadioButtonList></td>
      </tr>
    </tbody>
    <tbody id="DivListBoxType" style="display: none;">
      <tr>
        <td class="bqleft">多选项值：</td>
        <td class="bqright"><asp:TextBox ID="ListBoxType_SelectName" runat="server"></asp:TextBox>
          <input id="Button4" type="button" value="从数据字典中选择选项" class="btn" />
          <input id="Button8" type="button" value="从属性表中选择选项" class="btn" />
          <asp:TextBox ID="ListBoxType_SelectName_Id" runat="server" Style="display: none;"></asp:TextBox>
          <asp:TextBox ID="ListBoxType_SelectName_Property" runat="server" Style="display: none;"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">显示选项：</td>
        <td class="bqright"><asp:RadioButtonList ID="ListBoxType_Type" runat="server">
            <asp:ListItem Selected="True" Value="1">复选框</asp:ListItem>
            <asp:ListItem Value="2">多选列表框</asp:ListItem>
            <asp:ListItem Value="3">弹出窗口</asp:ListItem>
          </asp:RadioButtonList></td>
      </tr>
    </tbody>
    <tbody id="DivDateType" style="display: none;">
    </tbody>
    <tbody id="DivPicType" style="display: none;">
    </tbody>
    <tbody id="DivRadomType" style="display: none;">
    </tbody>
    <tbody id="DivFileType" style="display: none;">
    </tbody>
    <tbody id="DivNumberType" style="display: none;">
      <tr>
        <td class="bqleft">文本框长度：</td>
        <td class="bqright"><asp:TextBox ID="NumberType_TitleSize" runat="server" Columns="10" MaxLength="4">35</asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">默认值：</td>
        <td class="bqright"><asp:TextBox ID="NumberType_DefaultValue" runat="server" Columns="10"></asp:TextBox></td>
      </tr>
    </tbody>
    <tbody id="DivErLinkageType" style="display: none;">
      <tr>
        <td class="bqleft">指定一级分类：</td>
        <td class="bqright"><asp:TextBox ID="ErLinkage_Value" runat="server" Style="display: none;"></asp:TextBox>
          <asp:TextBox ID="ErLinkage_Value_Show" runat="server" Columns="10"></asp:TextBox>
          <asp:TextBox ID="ErLinkage_Value_Property" runat="server" Columns="10" Style="display: none;"></asp:TextBox>
          <input id="Button5" type="button" value="从数据字典中选择分类" class="btn" />
          <input id="Button9" type="button" value="从属性表中选择分类" class="btn" />
          <font color="red">注：请确认数据字典/属性表中具有二级分类</font></td>
      </tr>
      <tr>
        <td class="bqleft">二级分类别名：</td>
        <td class="bqright"><asp:TextBox ID="ErLinkage_Er_Alias" runat="server"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">二级分类字段名：</td>
        <td class="bqright"><asp:TextBox ID="ErLinkage_Er_Name" runat="server"></asp:TextBox>
          <span style="color: red;">*</span> 由字母、数字、下划线组成</td>
      </tr>
    </tbody>
    <tbody id="DivSanLinkageType" style="display: none;">
      <tr>
        <td class="bqleft">指定一级分类：</td>
        <td class="bqright"><asp:TextBox ID="SanLinkage_Value" runat="server" Style="display: none;"></asp:TextBox>
          <asp:TextBox ID="SanLinkage_Value_Show" runat="server" Columns="10"></asp:TextBox>
          <input id="Button6" type="button" value="从数据字典中选择分类" class="btn" />
          <font color="red">注：请确认数据字典中具有三级分类</font></td>
      </tr>
      <tr style="display: none;">
        <td class="bqleft">二级分类别名：</td>
        <td class="bqright"><asp:TextBox ID="SanLinkage_Er_Alias" runat="server"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">二级分类字段名：</td>
        <td class="bqright"><asp:TextBox ID="SanLinkage_Er_Name" runat="server"></asp:TextBox>
          <span style="color: red;">*</span> 由字母、数字、下划线组成</td>
      </tr>
      <tr style="display: none;">
        <td class="bqleft">三级分类别名：</td>
        <td class="bqright"><asp:TextBox ID="SanLinkage_San_Alias" runat="server"></asp:TextBox></td>
      </tr>
      <tr>
        <td class="bqleft">三级分类字段名：</td>
        <td class="bqright"><asp:TextBox ID="SanLinkage_San_Name" runat="server"></asp:TextBox>
          <span style="color: red;">*</span> 由字母、数字、下划线组成</td>
      </tr>
    </tbody>
    <tr runat="server" id="ChildColumn">
      <td class="bqleft">是否应用到子栏目：</td>
      <td class="bqright"><asp:RadioButtonList ID="IsChild" runat="server" RepeatDirection="Horizontal">
          <asp:ListItem Value="True">是</asp:ListItem>
          <asp:ListItem Selected="True" Value="False">否</asp:ListItem>
        </asp:RadioButtonList>
        （是否在“<asp:Literal ID="ColName_1" runat="server"></asp:Literal>”下的子栏目中应用该字段）</td>
    </tr>
    <tr>
      <td class="bqleft">是否在列表页中显示：</td>
      <td class="bqright"><asp:RadioButtonList ID="IsList" runat="server" RepeatDirection="Horizontal">
          <asp:ListItem Value="True">是</asp:ListItem>
          <asp:ListItem Selected="True" Value="False">否</asp:ListItem>
        </asp:RadioButtonList>
        （在信息列表中，以列表形式显示。）</td>
    </tr>
    <tr class="tdbg">
      <td class="bqleft">是否在列表页中搜索：</td>
      <td class="bqright"><asp:RadioButtonList ID="IsSearchForm" runat="server" RepeatDirection="Horizontal" CssClass="input1">
          <asp:ListItem Value="True">是</asp:ListItem>
          <asp:ListItem Selected="True" Value="False">否</asp:ListItem>
        </asp:RadioButtonList>
        （在列表页中显示出搜索项）</td>
    </tr>
    <tr>
      <td class="bqleft">是否允许用户录入数据：</td>
      <td class="bqright"><asp:RadioButtonList ID="IsUserInsert" runat="server" RepeatDirection="Horizontal">
          <asp:ListItem Selected="True" Value="True">是</asp:ListItem>
          <asp:ListItem Value="False">否</asp:ListItem>
        </asp:RadioButtonList></td>
    </tr>
    <tr>
      <td class="bqleft"></td>
      <td class="bqright"><asp:Button ID="Button1" runat="server" Text="添加字段" CssClass="btn" OnClick="Button1_Click" />
        <input id="Button2" type="button" value="返回字段列表" class="btn" onClick="javascript:window.location.href='FieldList.aspx?ModelId=<%=Request.QueryString["ModelId"] %>'" /></td>
    </tr>
  </table>
</form>
<br />
</body>
</html>