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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="EM" %>

<asp:Content ID="Content4" ContentPlaceHolderID="CPH_Content" runat="Server">
    <style type="text/css">
        .CommonPropertiesForTextBox { /* Please Write the Common properties for the TextBoxes Controls e.g hight,width etc in this class.*/
            width: 225px;
        }
    </style>

    <script type="text/javascript">


        function checkboxValue(control_id) {
            if ($('#' + control_id).is(":checked"))
                return 1;
            else
                return 0;
        }

        function NetworkAdapterBehaviour(control) {
            if (checkboxValue(control.id) > 0) {
                if (checkboxValue('<%= ChBx_EnableVLAN.UniqueID.Replace("$","_") %>') > 0) {
                    document.getElementById("<%= TxBx_VLanID.ClientID %>").disabled = false;
                }
                document.getElementById("<%= ChBx_EnableVLAN.ClientID%>").disabled = false;
                $('#VLAN').slideDown("slow");
            }
            else {
                $('#VLAN').slideUp("slow")
                document.getElementById("<%= ChBx_EnableVLAN.ClientID%>").checked = false;
                document.getElementById("<%= ChBx_EnableVLAN.ClientID%>").disabled = true;
                document.getElementById("<%= TxBx_VLanID.ClientID %>").disabled = true;
            }
        }

        function EnableVLAN(control) {
            if (checkboxValue(control.id)) {
                //alert(checkboxValue(control.id));
                if (checkboxValue('<%= ChBx_NetworkAdapter.UniqueID.Replace("$","_") %>') > 0) {
                    document.getElementById("<%= TxBx_VLanID.ClientID %>").disabled = false;
                }

            }
            else {
                //alert(TxBx_VLanID.UniqueID);

                document.getElementById("<%= TxBx_VLanID.ClientID %>").disabled = true;

            }
        }
    </script>

    <div class="col-xs-12">
        <table class="table table-bordered table-striped table-hover">
            <tr>
                <td class="col-sm-3 col-xs-12 row-label">
                    <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:Content,GN0000102%>" EnableViewState="false" />

                </td>
                <td class="col-sm-3 col-xs-12">
                    <asp:Label ID="Lbl_ServerGroupName2" runat="server" EnableViewState="true" />
                </td>
                <td class="col-sm-3 col-xs-12 row-label">
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Content,GN0000980%>" EnableViewState="false" />

                </td>
                <td class="col-sm-3 col-xs-12">
                    <asp:Label ID="Lbl_ServerName2" runat="server" EnableViewState="true" />
                </td>
            </tr>
        </table>
    </div>

    <asp:Panel ID="Pnl_add" runat="server" DefaultButton="Btn_Save">
        <div class="col-xs-12">
            <div class="card">
                <div class="header">
                    <h3>
                        <asp:Literal ID="liName" runat="server" Text='<%$ Resources:Content,L00202 %>' EnableViewState="false">
                        </asp:Literal>
                    </h3>
                </div>
                <div class="body">
                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="LI_Name" runat="server" Text='<%$ Resources:Content,GN000170 %>' EnableViewState="false"></asp:Literal>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_Name" data-label="Name" runat="server" CssClass="CommonPropertiesForTextBox"></asp:TextBox>
                                </div>
                            </div>
                            <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="TxBx_Name"
                                Text="*" ErrorMessage="<%$ Resources:Content,L00201 %>"></asp:RequiredFieldValidator>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="LI_EthernetCard" runat="server" Text='<%$ Resources:Content,L00200 %>' EnableViewState="false"></asp:Literal>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <asp:DropDownList ID="ddlEthernetCard"  data-label="Ethernet Card" runat="server">
                            </asp:DropDownList>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="LI_ShareNetworkAdapter" runat="server" Text='<%$ Resources:Content,L00203 %>'
                                EnableViewState="false"></asp:Literal>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <asp:CheckBox ID="ChBx_NetworkAdapter" data-label="Network Adapter" Text=" " runat="server" />
                        </div>
                    </div>


                    <div class="row">

                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="LI_EnableVLAN" runat="server" Text='<%$ Resources:Content,L00204%>' EnableViewState="false"></asp:Literal>

                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <asp:CheckBox ID="ChBx_EnableVLAN" runat="server" Text=" " Checked="false" Enabled="false" />
                        </div>

                    </div>
                    <div class="row">

                        <div class="col-sm-3 col-xs-12 row-label">
                            <asp:Literal ID="LI_VLANID" runat="server" Text='<%$ Resources:Content,HVServer32 %>' EnableViewState="false"></asp:Literal>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            <div class="form-group">
                                <div class="form-line">
                                    <asp:TextBox ID="TxBx_VLanID" runat="server" Enabled="false" MaxLength="4" CssClass="CommonPropertiesForTextBox"></asp:TextBox>
                                </div>
                            </div>
                            <asp:RangeValidator ID="rvVLanID" runat="server" Type="Integer" MinimumValue="1"
                                MaximumValue="4094" ControlToValidate="TxBx_VLanID" ErrorMessage="<%$ Resources:Content,L00205 %>" Text="*"></asp:RangeValidator>
                            <EM:FilteredTextBoxExtender ID="FTE_VLan" runat="server" TargetControlID="TxBx_VLanID" FilterType="Numbers,Custom" ValidChars="0123456789">
                            </EM:FilteredTextBoxExtender>
                        </div>

                    </div>

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

                </div>
            </div>
        </div>
        <asp:ValidationSummary ID="ValidationSum_1" runat="server" HeaderText='<%$ Resources:Content,EM000001 %>'
            ShowMessageBox="True" ShowSummary="False" />
    </asp:Panel>
    <script lang="javascript">
        AllowArrowKeysInFilteredTextBoxExtender('<%=FTE_VLan.ClientID%>');
    </script>
</asp:Content>
