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

<%@ 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="header">
                <h2>
                    <asp:Literal ID="Ltl_SubsInfo" runat="server" Text='<%$ Resources:Content,DGN0011112 %>' EnableViewState="false" /></h2>
            </div>
            <div class="body" id="Div_EditServer" runat="server">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal39" runat="server" Text='<%$ Resources:Content,GN000195 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <asp:CheckBox ID="ChBx_IsEnabled" runat="server" Checked="true" Text=" " data-label="Enabled" />
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal4" runat="server" Text='<%$ Resources:Content,DGN1110019 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_ReferenceId" runat="server" MaxLength="50" data-label="Reference ID"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxBx_ReferenceId"
                                    Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal5" runat="server" Text='<%$ Resources:Content,DGN0011105 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_ServerAlias" runat="server" MaxLength="50" data-label="Server Alias"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxBx_ServerAlias"
                                    Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal21" runat="server" Text='<%$ Resources:Content,SPT002376 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_IPAddress" Text="" runat="server" data-label="IP Address"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RFV_IPAddress" runat="server" ControlToValidate="TxBx_IPAddress"
                                    Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="TxBx_IPAddress"
                                    Display="None" SetFocusOnError="true" ErrorMessage="<%$ Resources:Content,String176 %>"
                                    ValidationExpression="<%$ Resources:Content,ValidateIP%>" />
                                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="TxBx_IPAddress"
                        Display="None" SetFocusOnError="true" ErrorMessage="<%$ Resources:Content,String176 %>"
                        ValidationExpression="\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b">
                    </asp:RegularExpressionValidator>
                    <EM:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789." ID="FilteredTextBoxExtender1"
                        runat="server" TargetControlID="TxBx_IPAddress" />--%>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Literal22" runat="server" Text='<%$ Resources:Content,String558 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:TextBox ID="TxBx_DAGServers" TextMode="MultiLine" Height="150px" Width="100%" runat="server"  style="resize:none;" data-label="DAG Servers"></asp:TextBox>
                            <EM:FilteredTextBoxExtender FilterType="Custom" ValidChars="0123456789.," ID="FilteredTextBoxExtender1"
                                runat="server" TargetControlID="TxBx_DAGServers" />
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <asp:Literal ID="Literal16" runat="server" Text="<%$Resources:Content,String559%>" EnableViewState="false"></asp:Literal>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal23" runat="server" Text='<%$ Resources:Content,String373 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_ServerName" runat="server" data-label="Remote Server FQDN"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxBx_ServerName"
                                    Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <asp:Button ID="Btn_GetDatabases" runat="server" class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,DGN0011107 %>' CausesValidation="false" />
                        <br />
                        <asp:Literal ID="Literal3" runat="server" Text='<%$ Resources:Content,DGN0011102 %>'
                            EnableViewState="false"></asp:Literal>

                    </div>
                </div>
                <%--<div class="row" id="tr_Databases" runat="server" visible="false">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3><%= Resources.Content.DGN0011108 %></h3>
                            </div>
                            <div class="body">
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal17" runat="server" Text='<%$ Resources:Content,DGN0011108 %>' EnableViewState="false"> </asp:Literal>
                                    </div>
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal18" runat="server" Text='<%$ Resources:Content,Exch002 %>' EnableViewState="false"> </asp:Literal>
                                    </div>
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal19" runat="server" Text='<%$ Resources:Content,GN0000183 %>' EnableViewState="false"> </asp:Literal>
                                    </div>
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal20" runat="server" Text='<%$ Resources:Content,DGN0011104 %>' EnableViewState="false"> </asp:Literal>
                                    </div>
                                </div>
                                <div class="row">
                                    <asp:Repeater ID="Rep_DataBases" runat="server">
                                        <ItemTemplate>
                                            <div class="col-sm-3 col-xs-12">
                                                <asp:Literal ID="Ltl_DBName" runat="server" EnableViewState="true"> </asp:Literal>
                                                <asp:HiddenField ID="HF_DBDetail" runat="server" />
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <asp:DropDownList ID="DDL_ArchiveDB" runat="server"></asp:DropDownList>
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_MaxMailboxes" onblur='ValidCurrMaxLoad(this);' runat="server" ></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="TxBx_MaxMailboxes"
                                                            Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_MailboxLoad" onblur='ValidCurrMaxLoad(this);' runat="server" ></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator26" runat="server" ControlToValidate="TxBx_MailboxLoad"
                                                            Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                        <asp:CompareValidator ID="CFV_TxBx_CNOMailbox" runat="server" SetFocusOnError="true"
                                                            Operator="LessThanEqual" Type="Integer" ControlToCompare="TxBx_MaxMailboxes"
                                                            ControlToValidate="TxBx_MailboxLoad" ErrorMessage='<%$ Resources:Content,String1042 %>'
                                                            Display="None">
                                                        </asp:CompareValidator>
                                                    </div>
                                                </div>
                                            </div>
                                        </ItemTemplate>
                                        <AlternatingItemTemplate>
                                            <div class="col-sm-3 col-xs-12">
                                                <asp:Literal ID="Ltl_DBName" runat="server" EnableViewState="true"> </asp:Literal>
                                                <asp:HiddenField ID="HF_DBDetail" runat="server" />
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <asp:DropDownList ID="DDL_ArchiveDB" runat="server"></asp:DropDownList>
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_MaxMailboxes" onblur="ValidCurrMaxLoad(this);" runat="server"  Text=""></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator24" runat="server" ControlToValidate="TxBx_MaxMailboxes"
                                                            Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-3 col-xs-12">
                                                <div class="form-group">
                                                    <div class="form-line">
                                                        <asp:TextBox ID="TxBx_MailboxLoad" onblur="ValidCurrMaxLoad(this);" runat="server"  Text=""></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator26" runat="server" ControlToValidate="TxBx_MailboxLoad"
                                                            Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                        <asp:CompareValidator ID="CFV_TxBx_CNOMailbox" runat="server" SetFocusOnError="true"
                                                            Operator="LessThanEqual" Type="Integer" ControlToCompare="TxBx_MaxMailboxes"
                                                            ControlToValidate="TxBx_MailboxLoad" ErrorMessage='<%$ Resources:Content,String1042 %>'
                                                            Display="None">
                                                        </asp:CompareValidator>
                                                    </div>
                                                </div>
                                            </div>
                                        </AlternatingItemTemplate>
                                    </asp:Repeater>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>--%>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal24" runat="server" Text='<%$ Resources:Content,String374 %>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:TextBox ID="TxBx_RPCProxyServer" TextMode="MultiLine" Width="100%" Height="150px" runat="server" MaxLength="1000" style="resize:none;" data-label="CAS Internal FQDN"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RFV_TxBx_RPCProxyServer" runat="server" ControlToValidate="TxBx_RPCProxyServer"
                                Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <div class="col-sm-5 col-xs-12">
                        <asp:Literal ID="Literal13" runat="server" Text='<%$ Resources:Content,String00999 %>'
                            EnableViewState="false"></asp:Literal>
                    </div>
                </div>
                <div class="row" id="Tr_PFServer" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal14" runat="server" Text='<%$ Resources:Content,Exch025%>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_PFServerFQDN" MaxLength="100" runat="server" data-label="Public Folder Server FQDN"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TxBx_PFServerFQDN"
                                    Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row" id="Tr_PFDB" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal34" runat="server" Text='<%$ Resources:Content,Exch0036%>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_PFDBName" runat="server" data-label="Public Folder Database" />
                        </div>
                    </div>
                </div>
                <div class="row" id="Tr_OABDistributionOptions" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Literal1" runat="server" Text='<%$ Resources:Content,String259%>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:DropDownList ID="DDL_VDir" runat="server" data-label="OAB Distribution Option">
                                <asp:ListItem Text="<%$Resources:Content,L0094 %>" Value="1"></asp:ListItem>
                                <asp:ListItem Text="<%$Resources:Content,SM014 %>" Value="2"></asp:ListItem>
                                <asp:ListItem Text="<%$Resources:Content,L0095 %>" Value="0"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </div>
                </div>
                <div class="row" id="Tr_ManageDns" runat="server">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            *<asp:Literal ID="Lbl_ManageDns" runat="server" Text='<%$ Resources:Content,String399%>'
                                EnableViewState="false"></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:CheckBox ID="CB_ManageDns" runat="server" AutoPostBack="true" Checked="false" Text=" " data-label="Manage DNS Enabled" />
                        </div>
                    </div>
                </div>

                <br />
                <div class="card" id="Tbl_ManageDNS" visible="false" runat="server">
                    <div class="header">
                        <h3><%= Resources.Content.String399 %></h3>
                    </div>
                    <div class="body">
                        <div class="row">
                            <div class="col-sm-3 col-xs-12 row-label">
                                <label>
                                    <asp:Literal ID="Literal2" runat="server" Text='<%$ Resources:Content,String400%>'
                                        EnableViewState="false"></asp:Literal>:</label>
                            </div>
                            <div class="col-sm-4 col-xs-12">
                                <div class="form-group">
                                    <asp:DropDownList ID="ddl_DnsServer" runat="server" data-label="DNS Server" />
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-xs-12 row-label">
                                <label>
                                    <asp:Literal ID="Literal8" runat="server" Text='<%$ Resources:Content,SPT002165%>'
                                        EnableViewState="false"></asp:Literal>:</label>
                            </div>
                            <div class="col-sm-4 col-xs-12">
                                <div class="form-group">
                                    <asp:DropDownList ID="DDL_ADNSTemplate" runat="server" data-label="DNS Template" />
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-3 col-xs-12 row-label">
                                <label>
                                    *<asp:Literal ID="Literal9" runat="server" Text='<%$ Resources:Content,Ex0023%>'
                                        EnableViewState="false"></asp:Literal>:</label>
                            </div>
                            <div class="col-sm-4 col-xs-12">
                                <div class="form-group">
                                    <div class="form-line">
                                        <asp:TextBox ID="TxBx_PublicIP" Text="" runat="server" MaxLength="50" data-label="CAS server/CAS array public IP"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RFV_PublicIP" runat="server" ControlToValidate="TxBx_PublicIP"
                                            Display="None" SetFocusOnError="True"></asp:RequiredFieldValidator>

                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxBx_PublicIP"
                                            Display="None" SetFocusOnError="true" ErrorMessage="<%$ Resources:Content,String176 %>"
                                            ValidationExpression="<%$ Resources:Content,ValidateIP%>">
                                        </asp:RegularExpressionValidator>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_Save" runat="server" CausesValidation="true" ValidationGroup="EditServer"
                            class="btn btn-primary waves-effect btnAction" Text='<%$ Resources:Content,GN0000281 %>' />
                        <asp:Button ID="Btn_Cancel" runat="server" class="btn btn-primary waves-effect" Text='<%$ Resources:Content,GN0000572 %>'
                            CausesValidation="false" />
                    </div>
                </div>
                <asp:ValidationSummary ID="ValidationSum_1" ValidationGroup="EditServer" runat="server"
                    HeaderText='<%$ Resources:Content,EM000001 %>' ShowMessageBox="True" ShowSummary="False" />
            </div>
        </div>
    </div>
    <script lang="javascript">
        AllowArrowKeysInFilteredTextBoxExtender('<%=FilteredTextBoxExtender1.ClientID%>');
    </script>
</asp:Content>
