<%@ control language="VB" autoeventwireup="false" inherits="RCC_OCS_CC_GroupOperations, MachSol.MachPanel.Web" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>
<%@ Register Src="~/Template/GVPager.ascx" TagName="Pager" TagPrefix="EM" %>
<%@ Register Src="~/Template/CC/Selectable_Selected_LBX.ascx" TagName="AddSelectableSelected" TagPrefix="EM" %>
<script type="text/javascript">
    $(document).ready(function () {

        $("#" + $(".currentSection").val()).css("display", "block");
        $("a[href='" + $(".currentSection").val() + "']").parent().addClass("current");

        $(".O365-detail-content").not("#" + $(".currentSection").val()).css("display", "none");

        $(".O365-Operations a").click(function (event) {
            event.preventDefault();
            $(this).parent().addClass("current");
            $(this).parent().siblings().removeClass("current");
            var tab = $(this).attr("href");
            $(".currentSection").val(tab);
            $(".O365-detail-content").not("#" + tab).css("display", "none");
            $("#" + tab).fadeIn();
            return false;
        });

        $(".Rbtn-Show-Role").click(function () {

            $(".select-role").show();
        });

        $(".Rbtn-Hide-Role").click(function () {

            $(".select-role").hide();
        });
       // update();

        setTimeout(function () { $("input[type='checkbox'], input[type='radio']").trigger("change"); /*$("input[type='checkbox']").trigger("click");*/ }, 300);

    });

    function HideUnwantedLink(href) {
        $("a[href='" + href + "']").hide();
    }

</script>
<div class="row">
    <div class="col-xs-12">

        <div class="card">
            <div class="header">
                <h2><%= Resources.Content.GN0000395%></h2>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-3 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="Ddl_PackageAddonFilter" AutoPostBack="true" runat="server">
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="col-sm-3 col-xs-12">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <asp:TextBox ID="Txt_DisplayNameFilter" runat="server"></asp:TextBox>
                                <asp:Label CssClass="form-label" ID="Literal22" runat="server" Text='<%$ Resources:Content,GN00001113 %>'></asp:Label>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-3 col-xs-12">
                        <div class="form-group form-float">
                            <div class="form-line">
                                <asp:TextBox ID="Txt_SIPAddressFilter" runat="server"></asp:TextBox>
                                <asp:Label CssClass="form-label" ID="Literal21" runat="server" Text='<%$ Resources:Content,Lync133 %>'></asp:Label>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-3 col-xs-12">
                        <asp:Button ID="Btn_Filter" CssClass="btn btn-primary waves-effect" runat="server" Text='<%$ Resources:Content,GN0000391 %>' />
                        &nbsp;<asp:Button ID="Btn_clear" Visible="false" CssClass="btn btn-primary waves-effect" runat="server"
                            Text="<%$ Resources:Content,String289 %>" />
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <EM:AddSelectableSelected ID="UCUsers" runat="server" />
                    </div>
                </div>
            </div>
        </div>
        <div class="row">&nbsp;</div>
        <div class="card Div_OpsRow" id="Div_OpsRow" runat="server">
            <div class="header">
                <h2><%= Resources.Content.GN00001320%></h2>
            </div>
            <div class="body">
                <asp:Button ID="Btn_Disable" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN00001025%>' />
                <asp:Button ID="Btn_Enable" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN00001024%>' />
                <asp:Button ID="Btn_Delete" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000278%>' />
                <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,DGN1119974%>"
                    TargetControlID="Btn_Delete" runat="server">
                </EM:ConfirmButtonExtender>
                <asp:Button ID="Btn_RemoveAndDeleteAllADUser" runat="server" Custom1="Custom" Style="display: none"
                    Text="<%$ Resources:Content,RemoveAndDeleteADUserText%>"
                    CssClass="btn btn-primary waves-effect btnAction" />
                <EM:ConfirmButtonExtender ID="CBE_RemoveAndDeleteAllADUser" runat="server" TargetControlID="Btn_RemoveAndDeleteAllADUser" />
            </div>
        </div>
        <br />
        <div class="row">
            <div class="col-xs-12 ">
                <div class="col-xs-12 col-sm-3 no-padding">
                    <div id="Pnl_Operations" runat="server" class="O365-Operations">

                        <input type="hidden" id="HF_CurrentSection" runat="server" class="currentSection" />
                        <div class="O365-Operations-Links">
                            <ul class="nav-pills nav-stacked">

                                <li><a href="UPNAndSIP">
                                    <asp:Literal ID="AD_UPNAndSIP" runat="server" Text="<%$ Resources:Content,UpdateUPN%>"
                                        EnableViewState="false" /></a></li>
                                <li><a href="PackageSwitch">
                                    <asp:Literal ID="CSB_PackageSwitch" runat="server" Text="<%$ Resources:Content,String553%>"
                                        EnableViewState="false" /></a></li>
                                <li><a href="DialPlan">
                                    <asp:Literal ID="AD_DialPlan" runat="server" Text="<%$ Resources:Content,Lync328%>"
                                        EnableViewState="false" /></a></li>

                                <li><a href="CallBundle">
                                    <asp:Literal ID="AD_CallBundle" runat="server" Text="<%$ Resources:Content,Lync342%>"
                                        EnableViewState="false" />
                                </a></li>


                                <li><a href="AssignNumbers">
                                    <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Content,DEV1243%>"
                                        EnableViewState="false" />
                                </a></li>

                                <li><a href="RemoveNumbers">
                                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,Lync381%>"
                                        EnableViewState="false" />
                                </a></li>

                            </ul>
                        </div>
                    </div>
                </div>

                <div class="col-xs-12 col-sm-9">

                    <div id="UPNAndSIP" class="card O365-detail-content">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-sm-3 col-xs-12 row-label">
                                    *<asp:Literal ID="Literal20" runat="server" Text="<%$ Resources:Content,UPNFirst%>"
                                        EnableViewState="false" />:
                                </div>
                                <div class="col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <asp:RadioButtonList ID="RBL_EmailAlias" runat="server">
                                            <asp:ListItem Text="<%$ Resources:Content,Exch00912%>" Value="%g.%s" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,Exch00913%>" Value="%1g%s"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,Exch00914%>" Value="%g%1s"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,Exch00915%>" Value="%s.%g"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,Exch00916%>" Value="%1s%g"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,Exch00917%>" Value="%s%1g"></asp:ListItem>
                                        </asp:RadioButtonList>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3 col-xs-12 row-label">
                                    <asp:Literal ID="ltl_n" runat="server" Text="<%$ Resources:Content,SetAsSIP%>"></asp:Literal>:
                                </div>
                                <div class="col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <asp:CheckBox ID="CB_SetSIPAddress" Text="&nbsp;" runat="server" />
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-sm-3 col-xs-12 row-label">
                                    *<asp:Literal ID="Literal24" runat="server" Text="<%$ Resources:Content,DGN1110334%>"
                                        EnableViewState="false" />:
                                </div>
                                <div class="col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_Domains" runat="server"></asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button ID="Btn_UpdateUPNAndSIP" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                                        CssClass="btn btn-primary waves-effect btnAction" />&nbsp;&nbsp;<asp:Label ID="Lbl_Info" runat="server"></asp:Label>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div id="PackageSwitch" class="card O365-detail-content">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-xs-12 row-label">
                                    Note: Select Plan/Addon for the selected Users to be switched on:
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="DDL_PlanAndPackagesGroupOperation" AutoPostBack="true" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_DialPlans" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_VoicePolicies" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_ConferencingPolicies" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-xs-12 row-label">
                                    <asp:Button ID="Btn_ChangePackage" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                                        CssClass="btn btn-primary waves-effect btnAction" />
                                </div>
                            </div>
                        </div>
                    </div>

                    <div id="DialPlan" class="card O365-detail-content">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-xs-12 row-label">
                                    Note: Please select Package/Addon from filter above before selecting Dial Plan/Voice Policy/Conferencing Policy.
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_DialPlans2" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_VoicePolicies2" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>

                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_ConferencingPolicies2" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <asp:Button ID="Btn_ChangeDialPlan" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                                        CssClass="btn btn-primary waves-effect btnAction" />
                                </div>
                            </div>

                        </div>
                    </div>

                    <div id="CallBundle" class="card O365-detail-content">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-sm-6 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_ChangeCallBundle" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <asp:Button ID="Btn_ChangeCallBundle" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                                        CssClass="btn btn-primary waves-effect btnAction" />
                                </div>
                            </div>

                        </div>
                    </div>

                    <div id="AssignNumbers" class="card O365-detail-content">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group">
                                        <asp:DropDownList ID="Ddl_PackageAddonAssignNumbers" AutoPostBack="true" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_DisplayNameAssign" runat="server"></asp:TextBox>
                                            <asp:Label CssClass="form-label" ID="Literal17" runat="server" Text='<%$ Resources:Content,GN00001113 %>'></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SIPAddressAssign" runat="server"></asp:TextBox>
                                            <asp:Label CssClass="form-label" ID="Literal18" runat="server" Text='<%$ Resources:Content,Lync133 %>'></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-3 col-xs-12">
                                    <asp:Button ID="Btn_FilterUsersAssign" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000391%>"
                                        CssClass="btn btn-primary waves-effect" />&nbsp;
                                <asp:Button ID="Btn_ClearFilterAssign" Visible="false" CausesValidation="false" runat="server" Text="<%$ Resources:Content,String289%>"
                                    CssClass="btn btn-primary waves-effect" />
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Literal ID="Ltr_AssignNote" Visible="false" EnableViewState="false" runat="server" Text='<%$ Resources:Content,Lync057 %>'></asp:Literal>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <EM:MPGridView ID="GV_UsersAssignNumber" CssClass="table table-bordered table-striped table-hover" AllowPaging="true" runat="server" AllowSorting="false"
                                        EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false">
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" ItemStyle-HorizontalAlign="Center">
                                                <HeaderTemplate>
                                                    <input runat="server" id="ChkBx_All" onclick="SetCheckedHeaderByClassName(this.checked, this, 'All', 'CheckMe');" type="checkbox" value="&nbsp;" name="ChkBx_All" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="ChkBx_All" Text="&nbsp;" CssClass="CheckMe" runat="server" onclick="SetCheckedHeaderByClassName(this.checked, this, '1', 'CheckMe');" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="<%$ Resources:Content, GN00001113 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                <ItemTemplate>
                                                    <asp:Label ID="Lbl_DN" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DisplayName") %>'></asp:Label>
                                                    <asp:HiddenField ID="Hf_LyncUserId" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.UserID") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" HeaderText="<%$ Resources:Content, Lync133 %>" DataField="SIPAddress" />
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-6" ItemStyle-CssClass="col-xs-6" HeaderText="<%$ Resources:Content, Dev1238%>">
                                                <ItemTemplate>
                                                    <div class="col-xs-8">
                                                        <asp:DropDownList ID="DDL_LineURI" runat="server">
                                                        </asp:DropDownList>
                                                    </div>
                                                    <div class="col-xs-3">
                                                        <div class="form-group form-float">
                                                            <div class="form-line">
                                                                <asp:TextBox ID="TxBx_Ext" runat="server" MaxLength="5"></asp:TextBox>
                                                                <asp:Label CssClass="form-label" ID="Ltr_Ext" Text='<%$ Resources:Content, Lync059%>' runat="server"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-xs-1">
                                                        <asp:RegularExpressionValidator ID="Rev_Ext" runat="server" Display="Dynamic"
                                                            Text="<%$ Resources:Content,SMI698%>" ForeColor="Red" ControlToValidate="TxBx_Ext" ValidationGroup="GOP"
                                                            ValidationExpression="^[0-9]+$"></asp:RegularExpressionValidator>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <PagerTemplate>
                                            <EM:Pager ID="Pager" runat="server" />
                                        </PagerTemplate>
                                    </EM:MPGridView>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button ID="Btn_AssignNumbers" Visible="false" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                                        CssClass="btn btn-primary waves-effect btnAction" />
                                </div>
                            </div>

                        </div>
                    </div>

                    <div id="RemoveNumbers" class="card O365-detail-content">
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_DisplayNameUnAssign" runat="server"></asp:TextBox>
                                            <asp:Label CssClass="form-label" ID="Label1" runat="server" Text='<%$ Resources:Content,GN00001113 %>'></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group form-float">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_SIPAddressUnAssign" runat="server"></asp:TextBox>
                                            <asp:Label CssClass="form-label" ID="Label2" runat="server" Text='<%$ Resources:Content,Lync133 %>'></asp:Label>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <asp:Button ID="Btn_FilterUsersUnAssign" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000391%>"
                                        CssClass="btn btn-primary waves-effect" />&nbsp;
                                <asp:Button ID="Btn_ClearFilterUnAssign" Visible="false" CausesValidation="false" runat="server" Text="<%$ Resources:Content,String289%>"
                                    CssClass="btn btn-primary waves-effect" />
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Literal ID="Ltr_UnAssignNote" Visible="false" EnableViewState="false" runat="server" Text='<%$ Resources:Content,Lync058 %>'></asp:Literal>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <EM:MPGridView ID="GV_UsersUnAssignNumber" CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="true" AllowSorting="false"
                                        EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false">
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" ItemStyle-HorizontalAlign="Center">
                                                <HeaderTemplate>
                                                    <input runat="server" id="ChkBx_All" onclick="SetCheckedHeaderByClassName(this.checked, this, 'All', 'CheckMe');" type="checkbox" name="ChkBx_All" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="ChkBx_All" Text="&nbsp;" CssClass="CheckMe" runat="server" onclick="SetCheckedHeaderByClassName(this.checked, this, '1', 'CheckMe');" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderStyle-CssClass="col-xs-5" ItemStyle-CssClass="col-xs-5" HeaderText="<%$ Resources:Content, GN00001113 %>">
                                                <ItemTemplate>
                                                    <asp:Label ID="Lbl_DN" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DisplayName") %>'></asp:Label>
                                                    <asp:HiddenField ID="Hf_LyncUserId" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.UserID") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" HeaderText="<%$ Resources:Content, Lync133 %>" DataField="SIPAddress" />
                                            <asp:TemplateField HeaderText="<%$ Resources:Content, Dev1238 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                                <ItemTemplate>
                                                    <asp:Label ID="Lbl_LineUri" runat="server" Text=""></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <PagerTemplate>
                                            <EM:Pager ID="Pager" runat="server" />
                                        </PagerTemplate>
                                    </EM:MPGridView>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-12">
                                    <asp:Button ID="Btn_RemoveNumbers" Visible="false" CausesValidation="false" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                                        CssClass="btn btn-primary waves-effect btnAction" />
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>
