<%@ control language="VB" autoeventwireup="false" inherits="PCC_VPS_CC_DNS, MachSol.MachPanel.Web" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>
<%@ Register Assembly="MachSol.MachPanel.Utility" Namespace="MachSol.MachPanel.Utility" TagPrefix="EM" %>

<div class="row">
    <div class="col-xs-12">
        <div class="card">
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <table class="table table-bordered table-striped table-hover">
                            <tr>
                                <td width="20%" class="row-label">
                                    <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Content,GN0000102%>"
                                        EnableViewState="false" />
                                </td>
                                <td>
                                    <asp:Label ID="Lbl_ServerGroupName2" runat="server" EnableViewState="true" />
                                </td>

                            </tr>
                        </table>
                    </div>

                    <asp:Panel ID="Pnl_Listing" runat="server">


                        <div class="col-xs-12 Div_OpsRow" id="Div_OpsRow" runat="server">

                            <div class="card">
                                <div class="header">
                                    <h3>
                                        <%= Resources.Content.GN00001320%>
                                        <%--<asp:Button ID="Btn_GoBack" class="btn btn-primary waves-effect btnAction pull-right" runat="server" Visible="false" Text='<%$ Resources:Content,DGN1110542 %>' />--%>
                                    </h3>
                                </div>
                                <div class="body">
                                    <div class="clearfix">
                                        <asp:Button ID="Btn_AddDNS" class="btn btn-primary waves-effect btnAction" runat="server" Text='<%$ Resources:Content,DGN1111278 %>' />
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div class="col-xs-12" id="Div_Listing" runat="server">
                            <EM:MPGridView ID="GV_DNSBlocks" CurrentSortExpression="Name" CurrentSortDirection="Asc"
                                CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="false" AllowSorting="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                                AutoGenerateColumns="false" DataKeyNames='DNSBlockId,Name'>

                                <Columns>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, VPS254 %>" HeaderStyle-CssClass="col-xs-6" ItemStyle-CssClass="col-xs-6" SortExpression="Name">

                                        <ItemTemplate>
                                            <asp:LinkButton ID="Lb_DNS" CommandName="Details" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.DNSBlockId")%>'
                                                runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name")%>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="<%$ Resources:Content, strUseforsharedVPShosting %>"
                                        HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2" SortExpression="IsSharedDNSPool">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_sharedVPShosting" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.IsSharedDNSPool")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>" HeaderStyle-CssClass="col-xs-2" ItemStyle-CssClass="col-xs-2">

                                        <ItemTemplate>

                                            <asp:LinkButton class="btn btn-primary waves-effect btnAction" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.DNSBlockId")%>'
                                                ID="LB_Remove" CommandName="RemoveDNSBlock" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                                            <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                                                TargetControlID="LB_Remove" runat="server">
                                            </EM:ConfirmButtonExtender>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </EM:MPGridView>
                        </div>

                        <div class="col-xs-12" id="Div_AddDNS" runat="server" visible="false">
                            <asp:Panel ID="Panel5" runat="server" DefaultButton="Btn_Save">
                                <div class="card">
                                    <div class="header">
                                        <h3>
                                            <asp:Literal ID="Literal8" Text="<%$ Resources:Content,VPS993%>" runat="server" />
                                        </h3>
                                    </div>
                                    <div class="body">
                                        <div class="row">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                *
                                        <asp:Literal ID="Literal15" Text="<%$ Resources:Content,VPS254%>" runat="server" EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TB_PreferredDNS" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" SetFocusOnError="true"
                                                    Display="None" ControlToValidate="TB_PreferredDNS" ValidationGroup="addip"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="RFV_AddSubNetMask" runat="server" ControlToValidate="TB_PreferredDNS"
                                                    Display="None" SetFocusOnError="true" ValidationGroup="addip" ValidationExpression="<%$ Resources:Content,ValidateIP%>"
                                                    ErrorMessage="<%$ Resources:Content,String176 %>"></asp:RegularExpressionValidator>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal1" Text="<%$ Resources:Content,VPS255%>" runat="server" EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TB_AlternateDNS" runat="server"></asp:TextBox>
                                                    </div>
                                                </div>
                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TB_AlternateDNS"
                                                    Display="None" SetFocusOnError="true" ValidationGroup="addip" ValidationExpression="<%$ Resources:Content,ValidateIP%>"
                                                    ErrorMessage="<%$ Resources:Content,String176 %>"></asp:RegularExpressionValidator>
                                            </div>
                                        </div>
                                        <div class="row">

                                            <div class="col-sm-3 col-xs-12 row-label">
                                                <asp:Literal ID="Literal20" Text="<%$ Resources:Content,strUseforsharedVPShosting%>" runat="server" EnableViewState="false" />:
                                            </div>
                                            <div class="col-sm-4 col-xs-12">
                                                <asp:CheckBox ID="ChBx_UseforsharedVPShosting" runat="server" Text=" "></asp:CheckBox>
                                            </div>

                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12">
                                                <asp:Button CssClass="btn btn-primary waves-effect btnAction" ValidationGroup="addip" ID="Btn_Save" runat="server" Text="<%$ Resources:Content,GN0000281%>" />
                                                <asp:ValidationSummary ID="ValidationSummary1" ValidationGroup="addip" HeaderText='<%$ Resources:Content,EM000001%>'
                                                    runat="server" ShowSummary="false" ShowMessageBox="true" />
                                                <asp:Button CssClass="btn btn-primary waves-effect" CausesValidation="false" ID="btn_cancelAdd" runat="server"
                                                    Text="<%$ Resources:Content,GN0000572%>" />
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </asp:Panel>
                        </div>
                    </asp:Panel>
                </div>

                <asp:Panel ID="Pnl_Details" runat="server" DefaultButton="Btn_Save">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="card">
                                <div class="header">
                                    <h3>
                                        <asp:Literal ID="Literal2" Text="<%$ Resources:Content,VPS993%>" runat="server" />
                                    </h3>
                                </div>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <asp:Literal ID="Literal3" Text="<%$ Resources:Content,VPS254%>" runat="server" EnableViewState="false" />:
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <asp:Label ID="Lbl_Subnet" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="col-xs-12">
                            <EM:MPGridView ID="GV_IP" CurrentSortExpression="DNS" CurrentSortDirection="Asc"
                                CssClass="table table-bordered table-striped table-hover" runat="server" AllowPaging="false" AllowSorting="true" EmptyDataText='<%$ Resources:Content, GN00001375 %>'
                                AutoGenerateColumns="false" DataKeyNames='DNSId,DNS'>

                                <Columns>
                                    <asp:TemplateField HeaderText="<%$ Resources:Content, String17 %>"
                                        HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4" SortExpression="DNS">
                                        <ItemTemplate>
                                            <asp:Label ID="Lbl_IPAddress" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.DNS")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="<%$ Resources:Content, GN0000360 %>"
                                        HeaderStyle-CssClass="col-xs-4" ItemStyle-CssClass="col-xs-4">
                                        <ItemTemplate>
                                            <asp:LinkButton CssClass="btn btn-primary waves-effect btnAction" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.DNSID")%>'
                                                ID="LB_Remove" CommandName="RemoveDNS" runat="server" Text="<%$ Resources:Content,GN0000278%>" />
                                            <EM:ConfirmButtonExtender ID="CBE_Remove" ConfirmText="<%$ Resources:Content,CBE001%>"
                                                TargetControlID="LB_Remove" runat="server">
                                            </EM:ConfirmButtonExtender>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </EM:MPGridView>
                        </div>
                        <div class="col-xs-12">
                            <div class="card">
                                <%-- <div class="Header">
                                    <h5>
                                        <asp:Literal ID="Literal10" Text="<%$ Resources:Content,HVServer118%>" runat="server" />
                                    </h5>
                                </div>--%>
                                <div class="body">
                                    <div class="row">
                                        <div class="col-sm-3 col-xs-12 row-label">
                                            <asp:Literal ID="Literal4" Text="<%$ Resources:Content,VPS255%>" runat="server" EnableViewState="false" />:
                                        </div>
                                        <div class="col-sm-4 col-xs-12">
                                            <div class="form-group">
                                                <div class="form-line">
                                                    <asp:TextBox ID="TB_AlternateDNS2" runat="server"></asp:TextBox>
                                                </div>
                                            </div>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TB_AlternateDNS2"
                                                Display="None" SetFocusOnError="true" ValidationGroup="addip" ValidationExpression="<%$ Resources:Content,ValidateIP%>"
                                                ErrorMessage="<%$ Resources:Content,String176 %>"></asp:RegularExpressionValidator>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12">
                                            <asp:Button CssClass="btn btn-primary waves-effect btnAction" ValidationGroup="addip" ID="Btn_Save2" runat="server"
                                                Text="<%$ Resources:Content,GN0000281%>" />

                                            <asp:Button CssClass="btn btn-primary waves-effect" CausesValidation="false" ID="Btn_Cancel" runat="server"
                                                Text="<%$ Resources:Content,GN0000572%>" />

                                            <asp:ValidationSummary ID="ValidationSummary2" ValidationGroup="addip" HeaderText='<%$ Resources:Content,EM000001%>'
                                                runat="server" ShowSummary="false" ShowMessageBox="true" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </asp:Panel>

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

