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

<div class="row" id="Pnl_AllowedListing" runat="server">

    <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow" runat="server">
        <div class="card">
            <div class="header">
                <h3>
                    <%= Resources.Content.GN00001320%>                                                                                                                                 
                </h3>
            </div>
            <div class="body">
                <div class="clearfix">
                    <asp:Button ID="Btn_SyncFedAllowedDomains" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content, Lync272 %>' />
                    <EM:ConfirmButtonExtender ID="CBE_FedAllowed" ConfirmText="<%$ Resources:Content,Lync280%>" TargetControlID="Btn_SyncFedAllowedDomains" runat="server"></EM:ConfirmButtonExtender>
                    <asp:Button ID="Btn_AddAllowedDomain" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content, DEV1078 %>' />
                    <asp:Button ID="Btn_AddBulkDomains" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content, Lync339 %>' />
                </div>
            </div>
        </div>
    </div>

    <div class="col-xs-12">
        <EM:MPGridView CssClass="table table-bordered table-striped table-hover" EmptyDataText='<%$ Resources:Content, GN00001375 %>' CurrentSortExpression="Domain"
            CurrentSortDirection="Asc" ID="GV_FedAllowedDomains" runat="server" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true">
            <Columns>
                <asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:Content,GN000125%>"
                    DataField="Domain" SortExpression="Domain" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" />
                <asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:Content,Lync038%>"
                    DataField="ProxyFQDN" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3" />
                <asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:Content,VerificationLevel%>"
                    DataField="VerificationLevel" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" />
                <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:Content,GN000148%>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                    <ItemTemplate>
                        <asp:Label ID="Lbl_Comments" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:BoundField HeaderStyle-HorizontalAlign="Left" HeaderText="<%$ Resources:Content,GN000148%>"
                    DataField="Comment" />--%>
                <asp:TemplateField HeaderText='<%$ Resources:Content,GN0000360%>' HeaderStyle-CssClass="col-xs-1" ItemStyle-CssClass="col-xs-1"
                    HeaderStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <ul class="option-menu">
                            <li class="dropdown">
                                <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                    <i class="material-icons">menu</i>
                                </a>
                                <ul class="dropdown-menu pull-right">
                                    <li>
                                        <asp:LinkButton ID="LB_Edit" SkinID="linkButtonEdit" CommandName="Edit_Domain" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Identity") %>'
                                            runat="server" Text="<%$ Resources:Content,GN0000276%>" />
                                    </li>
                                    <li>
                                        <asp:LinkButton ID="LB_Delete" CssClass="btnAction" runat="server" Text="<%$ Resources:Content,GN0000278%>"
                                            SkinID="linkButtonDelete" CommandName="Delete_Domain" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.Identity")%>' />
                                        <EM:ConfirmButtonExtender ID="CBE_Remove" runat="server" ConfirmText="<%$Resources:Content,DGN1119974%>"
                                            TargetControlID="LB_Delete">
                                        </EM:ConfirmButtonExtender>
                                    </li>
                                </ul>
                            </li>
                        </ul>


                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <EM:Pager ID="Pager" runat="server" />
            </PagerTemplate>
        </EM:MPGridView>
    </div>

</div>

<div id="Pnl_AddEditAllowedDomain" runat="server" defaultbutton="Btn_SaveAllowedDomain">
    <div class="card">
        <div class="header">
            <h3>
                <asp:Label
                    ID="Lbl_AddEditAllowedHeading" runat="server" Text='<%$ Resources:Content,DEV1078%>' EnableViewState="false"></asp:Label>
            </h3>
        </div>
        <div class="body">
            <div class="row" id="Tr_Note" runat="server">
                <div class="col-xs-12">
                    <b>Note:</b> If you want partner/sister companies to be able to communicate over Skype4B, add that domain here. You need Domain FQDN and Access Edge Server FQDN of the company you want to federate Skype4B with. Similarly, you will provide your Domain FQDN and '<b><asp:Literal ID="Ltr_EdgeServiceFQDN" runat="server"></asp:Literal></b>' as Access Edge Server FQDN to the admin of the company you want to federate with.
                </div>
            </div>

            <div class="row">
                <div class="col-sm-3 col-xs-12 row-label">
                    *<asp:Literal ID="Literal53" runat="server" EnableViewState="false" Text="<%$ Resources:Content,String80%>">
                    </asp:Literal>:
                </div>
                <div class="col-sm-4 col-xs-12">
                    <div class="form-group">
                        <div class="form-line">
                            <asp:TextBox ID="TxBx_FedAllowedDomainName" MaxLength="250" CausesValidation="true" ValidationGroup="FedAllowed" runat="server">
                            </asp:TextBox>
                            <asp:RequiredFieldValidator ID="RFV_FedAllowedDomainName" runat="server" ControlToValidate="TxBx_FedAllowedDomainName"
                                ValidationGroup="FedAllowed" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,String1039%>">
                            </asp:RequiredFieldValidator>
                           <%-- <asp:RegularExpressionValidator ID="REV_FedAllowedDomain" runat="server" ValidationGroup="FedAllowed"
                                ControlToValidate="TxBx_FedAllowedDomainName" ErrorMessage="Please enter a valid domain name."
                                Display="None" ValidationExpression="^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$">
                            </asp:RegularExpressionValidator>--%>
                            <asp:ValidationSummary ID="VS_FedDomain" runat="server" ValidationGroup="FedAllowed" ShowMessageBox="true"
                                ShowSummary="false" />
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-3 col-xs-12 row-label">
                    *<asp:Literal ID="Literal62" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Lync038%>">
                    </asp:Literal>:
                </div>
                <div class="col-sm-4 col-xs-12">
                    <div class="form-group">
                        <div class="form-line">
                            <asp:TextBox ID="TxBx_AccessEdgeServiceFQDN" MaxLength="200" runat="server">
                            </asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_AccessEdgeServiceFQDN"
    ValidationGroup="FedAllowed" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>">
</asp:RequiredFieldValidator>
                           <%-- <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ValidationGroup="FedAllowed"
                                ControlToValidate="TxBx_AccessEdgeServiceFQDN" ErrorMessage="Please enter a valid Access Edge Service FQDN."
                                Display="None" ValidationExpression="^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$">
                            </asp:RegularExpressionValidator>--%>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-3 col-xs-12 row-label">
                    <asp:Literal ID="Literal2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,VerificationLevel%>">
                    </asp:Literal>:
                </div>
                <div class="col-sm-4 col-xs-12">
                    <div class="form-group">
                        <asp:DropDownList ID="Ddl_VerificationLevel" runat="server">
                            <asp:ListItem Text="<%$ Resources:Content,AlwaysVerifiable%>" Value="AlwaysVerifiable"></asp:ListItem>
                            <asp:ListItem Text="<%$ Resources:Content,AlwaysUnverifiable%>" Value="AlwaysUnverifiable"></asp:ListItem>
                            <asp:ListItem Text="<%$ Resources:Content,UseSourceVerification%>" Value="UseSourceVerification" Selected="True"></asp:ListItem>
                        </asp:DropDownList>    
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-3 col-xs-12 row-label">
                    <asp:Literal ID="Literal1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN000148%>">
                    </asp:Literal>:
                </div>
                <div class="col-sm-4 col-xs-12">
                    <div class="form-group">
                        <asp:TextBox MaxLength="200" TextMode="MultiLine" ID="TxBx_FedAllowedComments" Rows="6" Width="100%" runat="server">
                        </asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ValidationGroup="FedAllowed"
                            ControlToValidate="TxBx_FedAllowedComments" ErrorMessage="Please enter valid comments."
                            Display="None" ValidationExpression="^[a-zA-Z][a-zA-Z0-9 -._]+$">
                        </asp:RegularExpressionValidator>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12">
                    <asp:Button ID="Btn_SaveAllowedDomain" CausesValidation="true" ValidationGroup="FedAllowed" runat="server" Text="<%$ Resources:Content,GN0000281%>"
                        CssClass="btn btn-primary waves-effect btnAction" />
                    <asp:Button ID="Btn_CancelAllowedDomain" runat="server" Text="<%$ Resources:Content,GN0000572%>"
                        CssClass="btn btn-primary waves-effect" />
                </div>
            </div>

        </div>
    </div>

</div>

<div id="Pnl_AddBulkDomains" runat="server">
    <div class="card">
        <div class="header">
            <h3>
                <%= Resources.Content.Lync339%>
            </h3>
        </div>
        <div class="body">
            <div class="row" id="Tr_BulkNote" runat="server">
                <div class="col-xs-12">
                    <b>Note:</b> If you want partner/sister companies to be able to communicate over Skype4B, add that domain here. You need Domain FQDN and Access Edge Server FQDN of the company you want to federate Skype4B with. Similarly, you will provide your Domain FQDN and '<b><asp:Literal ID="Ltr_EdgeServiceFQDNBulk" runat="server"></asp:Literal></b>' as Access Edge Server FQDN to the admin of the company you want to federate with.
                </div>
            </div>

            <div id="Pnl_BulkStep1" runat="server">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        *<asp:Literal ID="Literal77" EnableViewState="false" runat="server" 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_BulkDomains" 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_BulkDomains"
                                Display="None" SetFocusOnError="True" ValidationGroup="FedBulk"></asp:RequiredFieldValidator>
                        </div>

                    </div>
                    <div class="col-xs-2 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="FedBulk" HeaderText="<%$ Resources:Content,EM000001%>" />
                        <asp:Button ID="Btn_Next" runat="server" ValidationGroup="FedBulk" CausesValidation="True"
                            CssClass="btn btn-primary waves-effect" Text="<%$ Resources:Content,GN00001242%>" />
                        <asp:Button ID="Btn_BMBCancel" 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">
                        <EM:MPGridView ID="GV_BulkDomains" CurrentSortExpression="DomainName" CurrentSortDirection="Asc"
                            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, GN000125 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                    <ItemTemplate>
                                        <asp:Label ID="Lbl_DomainName" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DomainName")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$ Resources:Content, Lync038 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                    <ItemTemplate>
                                        <asp:Label ID="Lbl_EdgeServiceFQDN" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.EdgeServiceFQDN")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$ Resources:Content, VerificationLevel %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="Ddl_VerificationLevelBulk" runat="server">
                                            <asp:ListItem Text="<%$ Resources:Content,AlwaysVerifiable%>" Value="AlwaysVerifiable"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,AlwaysUnverifiable%>" Value="AlwaysUnverifiable"></asp:ListItem>
                                            <asp:ListItem Text="<%$ Resources:Content,UseSourceVerification%>" Value="UseSourceVerification" Selected="True"></asp:ListItem>    
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$ Resources:Content, GN000148 %>" HeaderStyle-CssClass="col-xs-3" ItemStyle-CssClass="col-xs-3">
                                    <ItemTemplate>
                                        <asp:Label ID="Lbl_Comments" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Comments")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                
                            </Columns>
                        </EM:MPGridView>


                    </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 id="Pnl_BulkDomainsLog" runat="server" style="display: none">
                <div class="row">
                    <div class="col-xs-12 row-label">
                        <asp:Literal ID="Literal88" runat="server" EnableViewState="false" Text="<%$ Resources:Content,Lync341%>" />:
                    </div>
                    <div class="col-xs-12">
                        <div id="Div_Result" runat="server">
                        </div>
                    </div>
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_BulkLogClose" runat="server" CausesValidation="false" CssClass="btn btn-primary waves-effect"
                            Text="<%$ Resources:Content,GN000150%>" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
