<%@ control language="VB" autoeventwireup="false" inherits="RCC_RDS_CC_Policies, MachSol.MachPanel.Web" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="System.Web.UI" TagPrefix="cc1" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>

<asp:Panel runat="server" ID="Listing">
    <div class="row Div_OpsRow" id="Div_Operations" runat="server">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <%= Resources.Content.GN00001320%>                                                                                                                                 
                    </h3>
                </div>
                <div class="body">
                    <div class="clearfix">
                        <asp:Button ID="BTN_AddPolicy" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,AddPolicy %>' />
                    </div>
                </div>
            </div>
        </div>
    </div>
    <asp:GridView ID="GV_Policies" CssClass="table table-bordered table-striped table-hover" AllowSorting="false" AllowPaging="true"
        EmptyDataText='<%$ Resources:Content, GN00001375 %>' runat="server" AutoGenerateColumns="False">

        <Columns>
            <asp:TemplateField HeaderText='<%$ Resources:Content, strName %>' HeaderStyle-CssClass="col-xs-4">
                <ItemTemplate>
                    <asp:Label ID="Lbl_Name" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText='<%$ Resources:Content, Description %>' HeaderStyle-CssClass="col-xs-6">
                <ItemTemplate>
                    <div id="Div_Description" runat="server">
                    </div>
                    &nbsp;<asp:LinkButton ID="Lb_ShowDetail" runat="server" Visible="false" Text="<%$ Resources:Content,GN0000667%>"
                        CommandName="ShowFullMsg"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText='<%$ Resources:Content, GN0000360 %>' HeaderStyle-CssClass="col-xs-2">
                <ItemTemplate>
                    <asp:LinkButton ID="LB_Edit" SkinID="linkButtonEdit" runat="server" Text="<%$ Resources:Content,GN0000276%>" CssClass="btn btn-primary" />
                    <asp:LinkButton ID="LB_Remove" SkinID="linkButtonRemove" runat="server" Text="<%$ Resources:Content,Remove%>" CssClass="btn btn-primary btnAction" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <%--PagerTemplate Start--%>
        <PagerTemplate>
            <EM:Pager ID="Pager1" runat="server" />
        </PagerTemplate>
        <%--PagerTemplate End--%>
    </asp:GridView>
</asp:Panel>

<asp:Panel runat="server" ID="AddEdit" Visible="false" DefaultButton="Btn_Save">
    <div class="row">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h2>
                        <asp:Literal ID="Lbl_AddEdit" runat="server" Text='<%$ Resources:Content, AddPolicy %>' /></h2>
                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-sm-2 col-xs-12 row-label">
                            *<asp:Literal ID="Literal3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,strName%>" />:
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_PolicyName" runat="server" MaxLength="150"></asp:TextBox>
                                </div>
                            </div>
                            <asp:RequiredFieldValidator ID="RFV_PolicyName" ControlToValidate="TxBx_PolicyName" ValidationGroup="AddPolicy"
                                runat="server" SetFocusOnError="true" Text="<%$ Resources:Content,PolicyNameRequired%>"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-2 col-xs-12 row-label">
                            <asp:Literal ID="Literal8" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Description%>" />:
                        </div>
                        <div class="col-sm-9 col-xs-12">
                            <div class="form-group">
                                <asp:TextBox ID="TxBx_PolicyDescription" runat="server" TextMode="MultiLine" Rows="7"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Literal ID="Literal7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,UsersAndGroups%>" />:
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <EM:AddSelectableSelected ID="UTCSUserAndGroups" runat="server" SortByValue="false" />
                            </div>
                        </div>

                    </div>
                    <hr />
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Literal ID="Literal1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,SessionCollections%>" />:
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <EM:AddSelectableSelected ID="UCTSProfile" runat="server" SortByValue="true" />
                            </div>
                        </div>

                    </div>
                    <hr />
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Literal ID="Literal2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,VirtualDesktopCollectionsPooled%>" />:
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <EM:AddSelectableSelected ID="UCVirtualDesktopPooled" runat="server" SortByValue="true" />
                            </div>
                        </div>
                    </div>
                    <hr />
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Literal ID="Literal4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,VirtualDesktopCollectionsPersonal%>" />:
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <EM:AddSelectableSelected ID="UCVirtualDesktopPersonal" runat="server" SortByValue="true" />
                            </div>
                        </div>
                    </div>
                    <hr />
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Literal ID="Literal5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,TSGatewayPolicies%>" />:
                        </div>
                        <div class="col-xs-12">
                            <div class="form-group">
                                <EM:AddSelectableSelected ID="UCTSGatewayPolicies" runat="server" SortByValue="true" />
                            </div>
                        </div>
                    </div>
                    <hr />
                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:Literal ID="Literal6" runat="server" EnableViewState="false" Text="<%$ Resources:Content,PublishedApps%>" />:
                        </div>
                        <div class="col-xs-12">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="UCTSProfile" EventName="OnSelectionUpdated" />
                                    <asp:AsyncPostBackTrigger ControlID="UCVirtualDesktopPooled" EventName="OnSelectionUpdated" />
                                    <asp:AsyncPostBackTrigger ControlID="UCVirtualDesktopPersonal" EventName="OnSelectionUpdated" />
                                    <asp:AsyncPostBackTrigger ControlID="UCTSGatewayPolicies" EventName="OnSelectionUpdated" />
                                </Triggers>
                                <ContentTemplate>
                                    <EM:AddSelectableSelected ID="UCPublishedApp" runat="server" SortByValue="true" />
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <asp:Button ID="Btn_Save" class="btn btn-primary waves-effect btnAction" ValidationGroup="AddPolicy" CausesValidation="true" runat="server" Text='<%$ Resources:Content,GN0000281 %>' />
                            <asp:Button ID="Btn_Cancel" CausesValidation="false" runat="server" Text='<%$ Resources:Content,GN0000572 %>' class="btn btn-primary waves-effect" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>


<asp:Panel ID="Pnl_MsgDetail" runat="server" CssClass="width-modal-popup-auto">
    <div class="col-xs-12">
        <div class="card">
            <div class="header container-fluid">
                <h3 class="pull-left">
                <asp:Literal ID="Literal9" runat="server" Text='<%$ Resources:Content, Description %>' />
                </h3>
                <span>
                    <button type="button" class="close" onclick="$find('<%=MPE_MsgDetail.ClientID%>').hide();">&times;</button>
                </span>
            </div>
            <div class="body">
                <div class="col-xs-12">
                    <div id="Div_MsgDetail" runat="server"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-12">
        <asp:Button class="btn btn-primary waves-effect" ID="Btn_MsgDetailClose" runat="server" Text='<%$ Resources:Content,GN000150%>' />
    </div>
</asp:Panel>
<asp:Button ID="Btn_Dummy2" runat="server" Style="display: none" Text='<%$ Resources:Content,GN0000575%>' />
<EM:ModalPopupExtender runat="server" ID="MPE_MsgDetail" BackgroundCssClass="modalBackground"
    DropShadow="false" PopupControlID="Pnl_MsgDetail" CancelControlID="Btn_MsgDetailClose"
    TargetControlID="Btn_Dummy2" />
