<%@ Page Language="c#" Inherits="Web.User.manageSignUp" CodeBehind="manageSignUp.aspx.cs" %>

<!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"-->
</head>
<body>
    <div class="list-func-box func-box">
        <form id="newsMange" method="post" runat="server">
        <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa  fa-desktop"></i>
                        <asp:PlaceHolder ID="placeHead" runat="server"></asp:PlaceHolder>
                    </li>
                    </ul>
             <div class="user-service">
                    <span data-original-title="使用说明:" data-placement="left" data-rel="popover" data-content="【壹】初始化时，请点击“选择字段”按钮，选择自定义表单中的字段信息。【贰】初始化时，完成选择字段后，请点击“生成表单”按钮。【注：在新增字段或修改了字段属性后，需重新点击“生成表单”按钮后才能生效！】" data-trigger="hover"><i class="fa fa-question-circle bigger-120 blue"></i></span>
                </div>
            </div>
             <div class="page-content">
            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <div class="tabbable">
                            <ul class="nav nav-tabs" id="myTab4">
                                <li class="active">
                                   <asp:HyperLink ID="hltable" runat="server" class="current">字段管理</asp:HyperLink>
                                </li>
                                <li>
                                    <asp:HyperLink ID="hlSignUpTable" runat="server">数据管理</asp:HyperLink>
                                </li>
                            </ul>
                        </div>
        <div class="bd  tab-content">
            <div class="function-hd">
                <div class="search-box pull-right">
                    <asp:Button ID="btnSelect" runat="server" Text="选择字段" CssClass="btn btn-sm btn-primary" />&nbsp;&nbsp;
                    <asp:Button ID="btnGenerate" runat="server" Text="生成表单" OnClick="btnGenerate_Click" CssClass="btn btn-sm btn-primary" />
                </div>
            </div>
            <div class="function-bd">
            <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
            <asp:DataGrid ID="linkGrid" runat="server" class="table table-striped table-bordered table-hover" AutoGenerateColumns="False"
                AllowSorting="True" DataKeyField="PkId" OnItemCommand="linkGrid_ItemCommand">
                <Columns>
                                        <asp:BoundColumn DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Name" HeaderText="字段名称" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Type" HeaderText="字段类型" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Size" HeaderText="字段长度" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="ShowName" HeaderText="显示名称" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="ShowType" HeaderText="显示类型" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="IsSystem" HeaderText="系统字段" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="AllowNull" HeaderText="允许为空" HeaderStyle-CssClass="title"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="IsOnly" HeaderText="是否唯一" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                        <ItemTemplate>
                                                <div class="action-buttons">
                                                    <asp:HyperLink ID="btnEdit" runat="server" CssClass="FBox" data-toggle="tooltip" data-placement="bottom" title="编辑"><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:HyperLink>
                                                    <asp:LinkButton ID="btnDel" runat="server" CommandName="del" CausesValidation="False" data-toggle="tooltip" data-placement="bottom" title="删除"><i class="ace-icon fa fa-trash bigger-120 red" ></i></asp:LinkButton>
                                                </div>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                                        <asp:BoundColumn DataField="IsSystem" HeaderText="IsSystem" Visible="False" HeaderStyle-CssClass="title"></asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
            <!--[if lte IE 7]></div><![endif]-->
            </div>
            <div class="ft">
                <font color="#FF0000">使用说明：初始化时，请点击“选择字段”按钮，选择自定义表单中的字段信息。选择字段完成后，点击“生成表单”按钮。*注：在新增字段或修改字段属性后，需重新点击“生成表单”按钮后才能生效！</font>
            </div>
        </div>
                      <!-- PAGE CONTENT ENDS -->
                </div>
            </div>
        </div>
        </form>
    </div>
     <!--#include file="../Css/foot.htm"-->
      <script type="text/javascript">
          jQuery(function ($) {
              //改用弹出层，因为201409发布的最新ghome开始不支持showModalDialog()
              $("#btnSelect").click(function () {
                  return true;
              }).fancybox({
                  'type': 'iframe',
                  'width': 650,
                  'height': 450,
                  autoSize: false,
                  'hideOnOverlayClick': false,
                  'href': 'SelectSignUpField.aspx?tableName=<%=tableName %>&type=<%=bigClassId %>&menuID=<%=menuId %>',
                        'padding': '0'
                });

            $("#btnGenerate").click(function () {
                return confirm("警告：对自定义表单字段的新增或修改，都可能导致原有自定义表单数据的破坏！如想继续，请按“确定”。如想放弃，请按“取消”。");
            });

            $(".FBox").click().fancybox({
                'width': 810,
                'height': 600,
                autoSize: false,
                'hideOnOverlayClick': false,
                'transitionIn': 'elastic',
                'transitionOut': 'fade',
                'type': 'iframe',
                'padding': '0'
            });

        })
    </script>
</body>
</html>
