<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="addSignUpField.aspx.cs" Inherits="Web.Wpdcc.addSignUpField" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>自定义表单字段编辑</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file = "../Css/head.htm" -->
        <script type="text/javascript" language="javascript">


            //关闭弹出层 刷新列表
            function divClose() {
                parent.$.fancybox.close();
                parent.location = "manageSignUpField.aspx";
            };

            function delayClose() {
                setTimeout("divClose()", 1000);
            }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="edit-func-box func-box">
        <div class="hd b">
                自定义表单字段编辑
        </div>
        <div class="bd">
        <asp:ScriptManager ID="scriptManager1" runat="server">
        </asp:ScriptManager>
        <table class="edit-table">
            <tr>
                <th style="width:15%">
                    <strong class="required">*</strong>字段名称：
                </th>
                <td>
                    <asp:TextBox ID="txtName" runat="server" class="input-md" notNull="true" msgname="字段名称"></asp:TextBox>
                </td>
                <td>
                    <span class="tip">仅允许包含字母(包括中文)和数字，且必须以字母开头</span>
                </td>
            </tr>
            <tr>
                <th>
                    字段类型：
                </th>
                <td>
                    <asp:DropDownList ID="ddlType" runat="server" CssClass="input-md" OnSelectedIndexChanged="ddlType_SelectedIndexChanged" AutoPostBack="True">
                        <asp:ListItem Selected="True" Value="varchar">文本型</asp:ListItem>
                        <asp:ListItem Value="int">数字型</asp:ListItem>
                        <asp:ListItem Value="datetime">日期型</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <span class="tip">为生成数据表时字段的类型</span>
                </td>
            </tr>
            <tr>
                <th>
                    <strong class="required">*</strong>字段长度：
                </th>
                <td>
                    <asp:TextBox ID="txtSize" runat="server" class="input-md" notNull="true" dataType="integer" minvalue="0" maxvalue="8000" MaxLength="4" msgname="字段大小"></asp:TextBox>
                </td>
                <td>
                    <span class="tip">做为自动生成录入表单时文本框的宽度依据，最大不超过8000</span>
                </td>
            </tr>
            <tr>
                <th>
                    <strong class="required">*</strong>显示名称：
                </th>
                <td>
                    <asp:TextBox ID="txtShowName" runat="server" class="input-md" notNull="true" msgname="显示名称"></asp:TextBox>
                </td>
                <td>
                    <span class="tip">为在用户录入表单中显示的名称</span>
                </td>
            </tr>
            <tr>
                <th>
                    显示类型：
                </th>
                <td>
                    <asp:DropDownList ID="ddlShowType" runat="server" CssClass="input-md">
                        <asp:ListItem Selected="True">单行文本框</asp:ListItem>
                        <asp:ListItem>多行文本框</asp:ListItem>
                        <asp:ListItem Value="多选框">多选框</asp:ListItem>
                        <asp:ListItem>下拉框</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <span class="tip">为自动生成用户录入表单时该字段的显示方式</span>
                </td>
            </tr>
            <tr>
                <th>
                    默认值：
                </th>
                <td>
                    <asp:UpdatePanel ID="upd1" runat="server" UpdateMode="Conditional">
                        <ContentTemplate>
                            <asp:TextBox ID="txtShowValue" runat="server" class="input-md"></asp:TextBox>
                            <asp:CheckBox ID="ckbSystemDate" runat="server" Text="系统当前时间" Visible="false" OnCheckedChanged="ckbSystemDate_CheckedChanged"
                                AutoPostBack="True" />
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="ddlType" EventName="ddlType_SelectedIndexChanged" />
                            <asp:AsyncPostBackTrigger ControlID="ckbSystemDateype" EventName="ckbSystemDate_CheckedChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
                <td>
                    <span class="tip">初始值，如果[显示类型]为“下拉框”有多项用“|”分隔</span>
                </td>
            </tr>
            <tr>
                <th>
                    允许空值：
                </th>
                <td>
                    <asp:DropDownList ID="ddlAllowNull" runat="server" CssClass="input-md">
                        <asp:ListItem Selected="True" Value="1">是</asp:ListItem>
                        <asp:ListItem Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <span class="tip">选项为“否”时，则在录入数据时为必填项</span>
                </td>
            </tr>
            <tr>
                <th>
                    是否唯一：
                </th>
                <td>
                    <asp:DropDownList ID="ddlIsOnly" runat="server" CssClass="input-md">
                        <asp:ListItem Value="1">是</asp:ListItem>
                        <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    <span class="tip">选项为“是”时，则在录入数据时，该字段不能重复录入</span>
                </td>
            </tr>
            <tr>
                <th>
                    提示信息：
                </th>
                <td>
                    <asp:TextBox ID="txtShowComments" runat="server" class="input-md"></asp:TextBox>
                </td>
                <td>
                    <span class="tip">为自动生成用户录入表单时对该字段录入信息的提示</span>
                </td>
            </tr>
            <tr>
                <td colspan="3" align="center">
                    <div class="ft">
                          <asp:Button ID="add" runat="server" Text="添 加" OnClientClick="return checkAllValidate();" OnClick="add_Click" CssClass="btn btn-sm btn-primary"></asp:Button>&nbsp;&nbsp;
                    <input type="button" class="btn btn-sm btn-primary" value="关 闭" onclick="parent.$.fancybox.close();" />
                    &nbsp;&nbsp;<asp:Label ID="labMsg" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </div>
                  
                </td>
            </tr>
        </table>
    </div>
    </form>
    <!--#include file="../Css/foot.htm"-->
</body>
</html>