<%@ control language="VB" autoeventwireup="false" inherits="RCC_OCS_CC_UCPhoneNumbers, 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" %>

<div class="row" id='Pnl_PhonenNumbers' runat='server'>

    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <h3>
                    <%= Resources.Content.Lync325%>                                                                                                                                 
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-sm-2 col-xs-12 row-label">
                        <asp:Literal ID="Literal2" runat="server" Text='<%$ Resources:Content,Lync333%>' EnableViewState="false" />:
                    </div>
                    <div class="col-sm-3 col-xs-12">
                        <asp:Label ID="Lbl_Quota" runat="server"></asp:Label>
                    </div>
                    <div class="col-sm-2 col-xs-12 row-label">
                        <asp:Literal ID="Literal3" runat="server" Text='<%$ Resources:Content,DEV1003%>' EnableViewState="false" />:
                    </div>
                    <div class="col-sm-3 col-xs-12">
                        <asp:Literal ID="Lbl_Used" runat="server"></asp:Literal>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-xs-12 Div_OpsRow" id="Tbl_Operations" runat="server">
        <div class="card">
            <div class="header">
                <h3>
                    <%= Resources.Content.GN00001320%>
                </h3>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_Import" CssClass="btn btn-primary waves-effect btnAction" runat="server"
                            Text='<%$ Resources:Content,Lync300%>' />
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-xs-12">
        <asp:Panel ID="Pnl_Btn_Filter" runat="server" CssClass="row" DefaultButton="Btn_Filter">
            <div class="panel-group search-panel" id="AS_PhoneNumbers" role="tablist" aria-multiselectable="true">
                <div class="col-xs-12" role="tab" id="SH_PhoneNumbers">
                    <div class="card">
                        <div class="header" role="button" data-toggle="collapse" data-parent="#AS_PhoneNumbers" href="#<%= CSB_PhoneNumbers.ClientID%>" aria-expanded="true" aria-controls="SH_PhoneNumbers">
                            <h3>
                                <%= Resources.Content.GN0000395%>
                            </h3>
                        </div>
                        <div id="CSB_PhoneNumbers" runat="server" class="body panel-collapse collapse" role="tabpanel" aria-labelledby="SH_PhoneNumbers" aria-expanded="false">
                            <asp:Panel ID="Panel1" runat="server" DefaultButton="Btn_Filter">
                                <div class="row">

                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                        <div class="form-group form-float">
                                            <div class="form-line">
                                                <asp:TextBox ID="Txt_PhoneNumber" runat="server"></asp:TextBox>
                                                <asp:Label CssClass="form-label" ID="Literal21" runat="server" EnableViewState="false" Text='<%$ Resources:Content,OCS003 %>'></asp:Label>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                        <div class="form-group form-float">
                                            <div class="form-line">
                                                <asp:TextBox ID="Txt_UserWorkflow" runat="server"></asp:TextBox>
                                                <asp:Label CssClass="form-label" ID="Label1" runat="server" EnableViewState="false" Text='<%$ Resources:Content,UserWorkflow %>'></asp:Label>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <asp:CheckBox ID="Cb_ShowFreeOnly" runat="server" Text="<%$ Resources:Content,ShowFreeNumbers %>" />
                                        </div>
                                    </div>
                                    <div class="col-md-3 col-sm-6 col-xs-12">
                                        <div class="form-group">
                                            <asp:CheckBox ID="Cb_HiddenFromUW" runat="server" Text="<%$ Resources:Content,HiddenFromUW %>" />
                                        </div>
                                    </div>
                                    <div class="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>
                            </asp:Panel>
                        </div>
                    </div>
                </div>
            </div>
        </asp:Panel>
    </div>

    <div class="col-xs-12">
        <EM:MPGridView ID="GV_PhoneNumbers" CssClass="table table-bordered table-striped table-hover" AllowSorting="true" AllowPaging="true"
            EmptyDataText='<%$ Resources:Content, Lync254 %>' runat="server" AutoGenerateColumns="False"
            CurrentSortExpression="Number" CurrentSortDirection="Asc">

            <Columns>
                <asp:TemplateField HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1" HeaderText="<%$ Resources:Content,String385%>">
                    <ItemTemplate>
                        <asp:Label ID="Lb_Status" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText='<%$ Resources:Content, SPT002215 %>' HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4"
                    SortExpression="Number">
                    <ItemTemplate>
                        <asp:HiddenField ID="Hdf_PhoneNumberID" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.NumberID") %>' />
                        <asp:Label ID="Lbl_PhoneNumber" runat="server" ></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText='<%$ Resources:Content, DEV1133 %>' HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                    <ItemTemplate>
                        <asp:Literal ID="Ltrl_User" runat="server" Text="--" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Content, HideFromUser %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                    <ItemTemplate>
                        <asp:Label ID="Lbl_HideFromUser" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <EM:Pager ID="Pager" runat="server" />
            </PagerTemplate>
        </EM:MPGridView>
    </div>

</div>
<div class="row" id="Pnl_ImportNumbers" runat="server">
    <div class="col-xs-12">
        <div class="card">
            <div class="header">
                <h3>
                    <%= Resources.Content.DEV1120%>
                </h3>
            </div>
            <div class="body">
                <div id="Pnl_BulkStep1" runat="server">
                    <div class="row" id="Tr_OnFly" runat="server">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:RadioButton ID="Rb_OnFly" runat="server" GroupName="RBPhoneNumbers" Text='<%$ Resources:Content,Lync303%>' />:
                        </div>
                        <div class="col-sm-9 col-xs-12">
                            <div class="row">
                                <div class="col-sm-5 col-xs-12">
                                    <asp:CheckBox ID="Cb_HideFromUser" runat="server" Text='<%$ Resources:Content,HideFromUser%>' />
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-5 col-xs-12">
                                    <div class="input-group">
                                        <span class="input-group-addon">*</span>
                                        <div class="form-group">
                                            <asp:DropDownList ID="Ddl_Countries" runat="server"></asp:DropDownList>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-1 col-xs-12 row-label">
                                    *<asp:Label ID="Literal52" runat="server" Text='<%$ Resources:Content,Lync362%>' EnableViewState="false" />:
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="TxBx_Region" runat="server"></asp:TextBox>
                                            <EM:AutoCompleteExtender ServiceMethod="SearchAreasSubs"
                                                MinimumPrefixLength="2"
                                                CompletionInterval="100" EnableCaching="false" CompletionSetCount="10"
                                                TargetControlID="TxBx_Region"
                                                ID="AutoCompleteExtender1" runat="server">
                                            </EM:AutoCompleteExtender>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-1 col-xs-12 row-label">
                                    *<asp:Label ID="Literal70" runat="server" Text='<%$ Resources:Content,GN0000673%>' EnableViewState="false" />:
                                </div>
                                <div class="col-sm-4 col-xs-12">
                                    <div class="form-group">
                                        <div class="form-line">
                                            <asp:TextBox ID="Txbx_Type" runat="server"></asp:TextBox>
                                            <EM:AutoCompleteExtender ServiceMethod="SearchTypesSubs"
                                                MinimumPrefixLength="2"
                                                CompletionInterval="100" EnableCaching="false" CompletionSetCount="10"
                                                TargetControlID="Txbx_Type"
                                                ID="AutoCompleteExtender2" runat="server">
                                            </EM:AutoCompleteExtender>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-5 col-xs-10">
                                    <div class="form-group">
                                        *<asp:TextBox ID="TxBx_PhoneNumbers" runat="server" TextMode="MultiLine" Rows="5" Width="100%"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="col-xs-2">
                                    <button type="button" class="btn btn-info btn-block btn-xs waves-effect" style="width: 30px;" data-trigger="focus" data-container="body" data-toggle="popover"
                                        data-placement="left" title="Phone Numbers" data-content="Please enter each number in new line.">
                                        <i class="material-icons">info</i>
                                    </button>

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

                    <div class="row">
                        <div class="col-xs-12 row-label">
                            <asp:RadioButton ID="Rb_AvailableNumbers" Checked="true" runat="server" GroupName="RBPhoneNumbers" Text='Available Pool' />:
                        </div>
                        <div class="col-xs-12">
                            <EM:AddSelectableSelected ID="UCPhoneNumber" runat="server" />
                        </div>
                    </div>

                    <div id="Tr_CSV" runat="server">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:RadioButton ID="Rb_Csv" runat="server" GroupName="RBPhoneNumbers" Text='<%$ Resources:Content,String380%>' />:
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="fileupload fileupload-new" data-provides="fileupload">
                                <span class="btn btn-primary btn-file"><span class="fileupload-new"><%= Resources.Content.strSelectFile%></span>
                                    <span class="fileupload-exists"><%= Resources.Content.GN0000385%></span>
                                    <asp:FileUpload ID="FU_PhoneNumbers" runat="server" />
                                </span>
                                <span class="fileupload-preview"></span>
                                <a href="#" class="close fileupload-exists" data-dismiss="fileupload" style="float: none">×</a>

                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="FU_PhoneNumbers"
                                    Display="None" SetFocusOnError="True" ValidationGroup="FedBulk"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="col-sm-5 col-xs-12">
                            <asp:Literal ID="Ltl_DownLoadCSV" runat="server"></asp:Literal>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-xs-12">
                            <asp:ValidationSummary ID="ValidationSummary5" runat="server" ShowMessageBox="true"
                                ShowSummary="false" ValidationGroup="ImportNumbers" HeaderText="<%$ Resources:Content,EM000001%>" />
                            <asp:Button ID="Btn_Next" runat="server" ValidationGroup="ImportNumbers" CausesValidation="True"
                                CssClass="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN00001242%>" />
                            <asp:Button ID="Btn_ImportCancel" runat="server" CausesValidation="false" CssClass="btn btn-primary waves-effect"
                                Text="<%$ Resources:Content,GN0000572%>" />
                        </div>
                    </div>
                </div>

                <div id="Pnl_BulkStep2" runat="server" visible="false">
                    <div class="row">
                        <div class="col-xs-12">
                            <asp:GridView ID="GV_BulkNumbers" CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="false" AllowSorting="false"
                                EmptyDataText='<%$ Resources:Content, GN00001375 %>' AutoGenerateColumns="false">
                                <Columns>
                                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <HeaderTemplate>
                                            <asp:CheckBox class="option-menu" Checked="true" ID="ChkBx_All" runat="server" Text=" " onclick="SetCheckedHeader(this.checked, this,'All');" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox class="option-menu" ID="ChkBx_Item" Checked="true" Text="&nbsp;" runat="server"></asp:CheckBox>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, OCS003 %>" HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_PhoneNumber" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Number")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000882 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_Country" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Country")%>'></asp:Label>
                                            <asp:HiddenField ID="HF_CountryId" runat="server" Value='<%# DataBinder.Eval(Container, "DataItem.CountryId")%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, Lync362 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_Area" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Area")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000673 %>" HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_Type" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Type")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, HideFromUser %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_HideFromUser" runat="server"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>

                        <%--<div class="col-xs-12">
                            <asp:LinkButton ID="Chbx_Checkall" runat="server" Text="<%$ Resources:Content, L0098 %>"></asp:LinkButton>
                            &nbsp;&nbsp;
                                <asp:LinkButton ID="Chbx_UncheckAll" runat="server" Text="<%$ Resources:Content, L0099 %>"></asp:LinkButton>
                        </div>--%>

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