<%@ page language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="Admin_System_Roles, MachSol.MachPanel.Web" %>

<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>

<asp:Content ID="Content4" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <ajax:UpdatePanel ID="UP_Roles" runat="server">
                    <ContentTemplate>
                        <EM:TabContainer ID="TC_Roles" runat="server" OnClientActiveTabChanged="loadTabPanel">
                            <EM:TabPanel ID="Tab_List" runat="server" HeaderText='<%$ Resources:Content, M0080 %>'>
                                <ContentTemplate>
                                    <asp:Button CssClass="btn btn-primary" ID="Btn_Tab0" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent0" runat="server">
                                        <div class="row Div_OpsRow" id="tblOperations" runat="server">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.GN00001320%>  </h3>
                                                    </div>
                                                    <div class="body">
                                                        <asp:Button CssClass="btn btn-primary btnAction" class="btn btn-primary waves-effect" ID="LB_AddRole" runat="server" PostBackUrl="AddRole.aspx"
                                                            Text="<%$ Resources:Content,DGN1110503%>" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>


                                        <asp:GridView CssClass="table table-bordered table-striped table-hover table-responsive" AllowSorting="true" EmptyDataText="<%$ Resources:Content, GN00001375 %>"
                                            ID="GV_List" runat="server" AutoGenerateColumns="False">

                                            <Columns>
                                                <asp:TemplateField SortExpression="RoleName" HeaderText="<%$ Resources:Content,DGN1110499%>"
                                                    HeaderStyle-CssClass="col-x-2">
                                                    <ItemTemplate>
                                                        <asp:Label ID="Lbl_Name" runat="server" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110504%>" HeaderStyle-CssClass="col-x-2">
                                                    <ItemTemplate>
                                                        <asp:Label ID="Lbl_Descriptions" runat="server" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,DGN1110505%>"
                                                    HeaderStyle-CssClass="col-x-2">
                                                    <ItemTemplate>
                                                        <asp:Label ID="Lbl_BuiltIn" runat="server" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,strIsSubResellerRole%>"
                                                    HeaderStyle-CssClass="col-x-2">
                                                    <ItemTemplate>
                                                        <asp:Label ID="Lbl_IsSubReseller" runat="server" />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,SecurityGroupName%>"
                                                    HeaderStyle-CssClass="col-x-2">
                                                    <ItemTemplate>
                                                        <div class="form-group">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_SecurityGroupName" MaxLength="250" runat="server" />
                                                            </div>
                                                        </div>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="<%$ Resources:Content,GN0000360%>" HeaderStyle-CssClass="col-x-2">
                                                    <ItemTemplate>
                                                        <asp:LinkButton CssClass="btn btn-primary" ID="LB_Edit" SkinID="linkButtonEdit" CommandName="Id" runat="server"
                                                            Text="<%$ Resources:Content,GN0000276%>"></asp:LinkButton>
                                                        <asp:LinkButton CssClass="btn btn-primary btnAction" ID="LB_Delete" SkinID="linkButtonDelete" CommandName="Remove" runat="server"
                                                            Text="<%$ Resources:Content,GN0000278%>"></asp:LinkButton>
                                                        <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,CBE001%>"
                                                            TargetControlID="LB_Delete">
                                                        </EM:ConfirmButtonExtender>
                                                        <asp:LinkButton CssClass="btn btn-primary btnAction" ID="LB_Clone" SkinID="linkButtonDelete" CommandName="Clone" runat="server"
                                                            Text="<%$ Resources:Content,DGN1110198%>"></asp:LinkButton>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <%--PagerTemplate Start--%>
                                            <%--<PagerTemplate>
                                                <EM:Pager ID="Pager1" runat="server" />
                                            </PagerTemplate>--%>
                                            <%--PagerTemplate End--%>
                                        </asp:GridView>
                                        <br />
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <asp:Button CssClass="btn btn-primary" class="btn btn-primary waves-effect btnAction" ID="Btn_UpdateRoles" runat="server"
                                                    Text="<%$ Resources:Content,GN0000281%>" />
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                            <EM:TabPanel ID="Tab_Detail" Enabled="false" runat="server" HeaderText='<%$ Resources:Content, GN0000843 %>'>
                                <ContentTemplate>
                                    <asp:Button CssClass="btn btn-primary" ID="Btn_Tab1" runat="server" Style="display: none;" />
                                    <asp:Panel ID="Pnl_TabContent1" runat="server" Visible="false">
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.String520%>  </h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                *
                                        <asp:Literal ID="Literal41" runat="server" Text="<%$ Resources:Content,SMI724%>" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <div class="form-line">
                                                                        <asp:TextBox ID="TxBx_RoleName" runat="server" MaxLength="100"></asp:TextBox>
                                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="TxBx_RoleName"
                                                                            Display="None" SetFocusOnError="True" ValidationGroup="EditClientDetail"></asp:RequiredFieldValidator>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                *
                                        <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,DGN1110504%>" />:
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:TextBox ID="TxBx_Description" Rows="5" runat="server" TextMode="MultiLine"
                                                                        MaxLength="500"></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_Description"
                                                                        Display="None" SetFocusOnError="True" ValidationGroup="EditClientDetail"></asp:RequiredFieldValidator>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="row" id="trSubReseller" runat="server">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,strIssubreseller%>" />
                                                                :
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:CheckBox ID="chkIsSubReseller" runat="server" AutoPostBack="true" Text=" " />
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="row">
                                                            <div class="col-sm-3 col-xs-12 row-label">
                                                                <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Content,ReadOnly%>" />
                                                                :
                                                            </div>
                                                            <div class="col-sm-4 col-xs-12">
                                                                <div class="form-group">
                                                                    <asp:CheckBox ID="chkIsReadOnly" runat="server" Text="<%$ Resources:Content,ReadOnly%>" />
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="row">
                                                            <div class="col-xs-12">
                                                                <asp:ValidationSummary ID="VS" runat="server" ShowMessageBox="true" ShowSummary="false"
                                                                    ValidationGroup="EditClientDetail" HeaderText="<%$ Resources:Content,EM000001%>" />
                                                                <asp:Button CssClass="btn btn-primary btnAction" ID="Btn_Update" ValidationGroup="EditClientDetail" CausesValidation="true"
                                                                    SkinID="saveButton" runat="server" Text="<%$ Resources:Content,GN0000281%>" />
                                                                <asp:Button CssClass="btn btn-primary" ID="Btn_Back" CausesValidation="false" SkinID="cancelButton" runat="server"
                                                                    Text="<%$ Resources:Content,GN0000572%>" PostBackUrl="~/RCC/System/roles.aspx" />
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="row">
                                            <div class="col-xs-12">
                                                <div class="card">
                                                    <div class="header">
                                                        <h3><%= Resources.Content.FeaturesAccess%>  </h3>
                                                    </div>
                                                    <div class="body">
                                                        <div class="row">
                                                            <div class="col-sm-6 col-xs-12">
                                                                <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                                                                    <asp:Repeater ID="Repeater1" runat="server">
                                                                        <ItemTemplate>
                                                                            <div id="Div_CB_GroupName" runat="server">
                                                                                <div class="panel panel-primary" id='<%# String.Format("rep1_group_permissions_panel_{0}", Container.ItemIndex)%>'>
                                                                                    <div class="panel-heading" id='<%# String.Format("rep1_group_permissions_heading_{0}", Container.ItemIndex)%>'>
                                                                                        <h4 class="panel-title">
                                                                                            <a role="button" id='<%# String.Format("rep1_toggle_permissions_{0}", Container.ItemIndex)%>' data-toggle="collapse" data-parent="#accordion" href='<%# String.Format("#rep1_group_permissions_body_{0}", Container.ItemIndex)%>' aria-expanded="false" aria-controls='<%# String.Format("rep1_group_permissions_body_{0}", Container.ItemIndex)%>' class="collapsed">
                                                                                                <asp:Label ID="Lbl_GroupName" runat="server" />
                                                                                            </a>
                                                                                        </h4>
                                                                                    </div>
                                                                                    <div id='<%# String.Format("rep1_group_permissions_body_{0}", Container.ItemIndex)%>' class="panel-collapse collapse" role="tabpanel" aria-labelledby='<%# String.Format("rep1_group_permissions_heading_{0}", Container.ItemIndex)%>' aria-expanded="false" style="height: 0px;">
                                                                                        <div class="panel-body">
                                                                                            <asp:CheckBox ID="CB_SelectAll" runat="server" />

                                                                                            <div id="Div_Data" runat="server">
                                                                                                <div class="m-t-5"></div>
                                                                                                <%--  <asp:CheckBoxList ID="CBL_Features" runat="server" Class="table hide-disabled-items" />--%>
                                                                                                <asp:Repeater ID="Rep_Feature" runat="server" OnItemDataBound="Rep_Feature_ItemDataBound">
                                                                                                    <ItemTemplate>
                                                                                                        <div>
                                                                                                            <asp:CheckBox ID="ChBx_Feature" runat="server" />
                                                                                                        </div>
                                                                                                    </ItemTemplate>
                                                                                                </asp:Repeater>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>

                                                                                <div class="m-t-5"></div>
                                                                            </div>
                                                                        </ItemTemplate>
                                                                    </asp:Repeater>
                                                                </div>
                                                            </div>

                                                            <div class="col-sm-6 col-xs-12">
                                                                <div class="panel-group" id="accordion1" role="tablist" aria-multiselectable="true">
                                                                    <asp:Repeater ID="Rep_FeaturesGroup" runat="server">
                                                                        <ItemTemplate>
                                                                            <div id="Div_CB_GroupName" runat="server">
                                                                                <div class="panel panel-primary" <%# String.Format("rep2_group_permissions_panel_{0}", Container.ItemIndex)%>>
                                                                                    <div class="panel-heading" id='<%# String.Format("rep1_group_permissions_heading_{0}", Container.ItemIndex)%>'>
                                                                                        <h4 class="panel-title">
                                                                                            <a role="button" id='<%# String.Format("rep2_toggle_permissions_{0}", Container.ItemIndex)%>' data-toggle="collapse" data-parent="#accordion1" href='<%# String.Format("#rep2_group_permissions_body_{0}", Container.ItemIndex)%>' aria-expanded="false" aria-controls='<%# String.Format("rep2_group_permissions_body_{0}", Container.ItemIndex)%>' class="collapsed">
                                                                                                <asp:Label ID="Lbl_GroupName" runat="server" />
                                                                                            </a>
                                                                                        </h4>
                                                                                    </div>
                                                                                    <div id='<%# String.Format("rep2_group_permissions_body_{0}", Container.ItemIndex)%>' class="panel-collapse collapse" role="tabpanel" aria-labelledby='<%# String.Format("rep2_group_permissions_heading_{0}", Container.ItemIndex)%>' aria-expanded="false" style="height: 0px;">
                                                                                        <div class="panel-body">
                                                                                            <asp:CheckBox ID="CB_SelectAll" runat="server" />

                                                                                            <div id="Div_Data" runat="server">
                                                                                                <div class="m-t-5"></div>
                                                                                                <%--<asp:CheckBoxList ID="CBL_Features" runat="server" Class="table hide-disabled-items" />--%>
                                                                                                <asp:Repeater ID="Rep_Feature" runat="server" OnItemDataBound="Rep_Feature_ItemDataBound">
                                                                                                    <ItemTemplate>
                                                                                                        <div class="FeaturePadding">
                                                                                                            <asp:CheckBox ID="ChBx_Feature" runat="server" />
                                                                                                        </div>
                                                                                                    </ItemTemplate>
                                                                                                </asp:Repeater>
                                                                                            </div>
                                                                                        </div>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="m-t-5"></div>
                                                                            </div>
                                                                        </ItemTemplate>
                                                                    </asp:Repeater>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                    </asp:Panel>
                                </ContentTemplate>
                            </EM:TabPanel>
                        </EM:TabContainer>
                    </ContentTemplate>
                </ajax:UpdatePanel>
            </div>
        </div>
    </div>
</asp:Content>
