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

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

<asp:Button ID="Btn_Dummy" runat="server" CssClass="btn-dummy" />
<EM:ModalPopupExtender ID="MPE_AgreementDetails" runat="server" TargetControlID="Btn_Dummy" CancelControlID="Btn_AgreementCancel"
    BackgroundCssClass="modalBackground" DropShadow="False" PopupControlID="Pnl_AgreementDetails">
</EM:ModalPopupExtender>
<asp:Panel ID="Pnl_AgreementDetails" runat="server" class="width-modal-popup-auto" DefaultButton='Btn_AgreementAccept'>
    <div class="col-xs-12">
        <div class="card">
            <div class="header container-fluid">
                <h3 class="pull-left">Accept Microsoft agreement
                </h3>
                <span>
                    <button type="button" class="close" onclick="cancelAcceptAgreement(); $find('<%=MPE_AgreementDetails.ClientID%>').hide();">&times;</button>
                </span>
            </div>
            <div class="body">
                <div class="row">
                    <div class="col-xs-12">
                        <label>
                            <asp:Literal ID="Ltrl_UpdateAgreementNote" runat="server" Text="<%$ Resources:Content, strUpdateAgreementNote %>"></asp:Literal>
                            <asp:HyperLink ID="HL_AcceptMSAgreement" runat="server" Text="<%$ Resources:Content,MicrosoftCustomerAgreement %>"
                                NavigateUrl="#" Target="_blank">
                            </asp:HyperLink>
                        </label>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>*<asp:Literal ID="Ltrl_AgreementContactFirstName" runat="server" Text='<%$Resources:Content, GN00001132 %>'></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_AgreementContactFirstName" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <asp:RequiredFieldValidator ID="RFV_AgreementContactFirstName" runat="server" ControlToValidate="TxBx_AgreementContactFirstName"
                            SetFocusOnError="true" ValidationGroup="UPAgreement" Display="Dynamic" CssClass="text-danger"
                            ErrorMessage="<%$Resources:Content,GN00008064 %>">
                        </asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>*<asp:Literal ID="Ltrl_AgreementContactLastName" runat="server" Text='<%$Resources:Content, GN00001133 %>'></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_AgreementContactLastName" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <asp:RequiredFieldValidator ID="RFV_AgreementContactLastName" runat="server" ControlToValidate="TxBx_AgreementContactLastName"
                            SetFocusOnError="true" ValidationGroup="UPAgreement" Display="Dynamic" CssClass="text-danger"
                            ErrorMessage="<%$Resources:Content,GN00008069 %>">
                        </asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>*<asp:Literal ID="Ltrl_AgreementContactEmail" runat="server" Text='<%$Resources:Content, GN0000652 %>'></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_AgreementContactEmail" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <asp:RequiredFieldValidator ID="RFV_AgreementContactEmail" runat="server" ControlToValidate="TxBx_AgreementContactEmail"
                            SetFocusOnError="true" ValidationGroup="UPAgreement" Display="Dynamic" CssClass="text-danger"
                            ErrorMessage="<%$Resources:Content,L00167 %>">
                        </asp:RequiredFieldValidator>
                       <%-- <asp:RegularExpressionValidator ID="REV_AgreementContactEmail" runat="server" ControlToValidate="TxBx_AgreementContactEmail" Display="Dynamic"
                            CssClass="text-danger"
                            ErrorMessage="<%$Resources:Content,SMI00940 %>" SetFocusOnError="true" ValidationGroup="UPAgreement"
                            ValidationExpression="^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$">
                        </asp:RegularExpressionValidator>--%>
                    </div>
                </div>
                <%--GN00012--%>
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>*<asp:Literal ID="Ltrl_AgreementContactPhone" runat="server" Text='<%$Resources:Content, GN00012 %>'></asp:Literal>:</label>
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <div class="form-line">
                                <asp:TextBox ID="TxBx_AgreementContactPhone" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <asp:RequiredFieldValidator ID="RFV_AgreementContactPhone" runat="server" ControlToValidate="TxBx_AgreementContactPhone"
                            SetFocusOnError="true" ValidationGroup="UPAgreement" Display="Dynamic" CssClass="text-danger"
                            ErrorMessage="<%$Resources:Content,GN00008058 %>">
                        </asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="row">
                    <asp:HiddenField ID="HF_AgreementTemplateId" runat="server" />
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_AgreementAccept" runat="server" Text='<%$Resources:Content, GN0000858 %>' class="btn btn-primary waves-effect btnAction" ValidationGroup="UPAgreement" CausesValidation="true"></asp:Button>
                        <asp:Button ID="Btn_AgreementCancel" runat="server" Text='<%$Resources:Content, GN0000572 %>' class="btn btn-primary waves-effect" CausesValidation="false" OnClientClick="cancelAcceptAgreement()"></asp:Button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>

<div class="row">
    <div class="col-xs-12">
        <div class="card">
            <%--<div class="header">
                <h3>
                    <asp:Literal ID="Literal8" runat="server" EnableViewState="false" Text="<%$ Resources:Content,String419%>" />
                </h3>
            </div>--%>
            <div class="body">
                <div class="row">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <asp:Literal ID="Literal1" runat="server" EnableViewState="false" Text="<%$ Resources:Content,MicrosoftID%>" />:                            
                    </div>
                    <div class="col-sm-4 col-xs-12">
                        <div class="form-group">
                            <asp:Literal ID="Ltl_MicrosoftID" runat="server" EnableViewState="true" />
                        </div>
                    </div>
                </div>

                <div class="row" id="Div_MicrosoftAgreement" runat="server" visible="true">
                    <div class="col-sm-3 col-xs-12 row-label">
                        <label>
                            <asp:Literal ID="Ltrl_MSAgreement" runat="server" Text="<%$ Resources:Content,MicrosoftAgreement %>"></asp:Literal>
                        </label>
                    </div>
                    <div class="col-sm-9 col-xs-12">
                        <asp:CheckBox ID="Cb_AcceptMSAgreement" runat="server" Text="<%$ Resources:Content,AcceptLatest %>" onclick="if(this.checked){showAgreementModal();}"></asp:CheckBox>
                        <asp:HyperLink ID="HL_MSAgreement" runat="server" Text="<%$ Resources:Content,MicrosoftCustomerAgreement %>" NavigateUrl="#" Target="_blank">
                        </asp:HyperLink>
                    </div>
                </div>

                <div class="row" id="Div_AcceptedAgreement" runat="server" visible="false">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <asp:Literal ID="Literal8" runat="server" EnableViewState="false" Text="<%$ Resources:Content,MicrosoftAgreement %>" />
                                <span class="pull-right">
                                    <asp:LinkButton ID="Lbtn_UpdateAgreement" CssClass="btnAction" runat="server" Text="<%$ Resources:Content,GN0000654 %>" OnClientClick="showAgreementModal(); return false;"></asp:LinkButton>
                                </span>
                            </div>
                            <div class="body">
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Literal18" runat="server" Text='<%$ Resources:Content,AcceptedBy %>'></asp:Literal>
                                        </label>
                                    </div>
                                    <div class="col-sm-9 col-xs-12">
                                        <asp:Literal ID="Ltrl_AcceptedBy" runat="server" EnableViewState="false" />
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Literal19" runat="server" Text='<%$ Resources:Content,DateAccepted %>'></asp:Literal>
                                        </label>
                                    </div>
                                    <div class="col-sm-9 col-xs-12">
                                        <asp:Literal ID="Ltrl_DateAgreed" runat="server" EnableViewState="false" />
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <label>
                                            <asp:Literal ID="Literal20" runat="server" Text='<%$ Resources:Content,Agreement %>'></asp:Literal>
                                        </label>
                                    </div>
                                    <div class="col-sm-9 col-xs-12">
                                        <asp:HyperLink ID="HL_AcceptedAgreementLink" runat="server" Text="<%$ Resources:Content,MicrosoftCloudAgreement %>" NavigateUrl="#" Target="_blank"></asp:HyperLink>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3>
                                    <asp:Literal ID="Literal2" runat="server" EnableViewState="false" Text="<%$ Resources:Content,BillToInfo%>" />
                                </h3>
                            </div>
                            <div class="body">

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal15" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001132%>" />:                            
                                    </div>
                                    <div class="col-sm-4 col-xs-12">

                                        <div class="form-group form-float">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_FirstName" runat="server" />
                                            </div>
                                        </div>
                                        <asp:RequiredFieldValidator ID="RFV_TxBx_FirstName" runat="server" ControlToValidate="TxBx_FirstName"
                                            ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal16" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001133%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_LastName" runat="server" />
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_LastName" runat="server" ControlToValidate="TxBx_LastName"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal3" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001077%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_CompanyName" runat="server" />
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_CompanyName" runat="server" ControlToValidate="TxBx_CompanyName"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal4" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000878%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_Address1" runat="server" />
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_Address1" runat="server" ControlToValidate="TxBx_Address1"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal5" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001136%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox ID="TxBx_Address2" runat="server" />
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal56" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000880%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox runat="server" ID="TxBx_City"></asp:TextBox>

                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_City" runat="server" ControlToValidate="TxBx_City"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal7" runat="server" EnableViewState="false" Text="<%$ Resources:Content,FAM0058%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <asp:DropDownList ID="DDL_Country" runat="server" Enabled="false" />
                                        </div>
                                    </div>
                                </div>

                                <div class="row" id="TR_State" runat="server">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal6" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001313%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">

                                            <asp:DropDownList ID="DDL_State" runat="server" />
                                            <%--<div class="form-group form-float">
                                                    <div class="form-line">
                                                        <asp:TextBox runat="server" ID="txtState"></asp:TextBox>
                                                    </div>
                                                </div>--%>
                                        </div>
                                    </div>
                                </div>

                                <div class="row" id="TR_province" runat="server" visible="false">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal17" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001313%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox runat="server" ID="TxBx_province"></asp:TextBox>
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_province" runat="server" ControlToValidate="TxBx_province"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal9" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001522%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox runat="server" ID="TxBx_Zip"></asp:TextBox>
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_Zip" runat="server" ControlToValidate="TxBx_Zip"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal10" runat="server" EnableViewState="false" Text="<%$ Resources:Content,OCS003%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox runat="server" ID="TxBx_Phone"></asp:TextBox>
                                            </div>
                                            <asp:RequiredFieldValidator ID="RFV_TxBx_Phone" runat="server" ControlToValidate="TxBx_Phone"
                                                ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        *&nbsp;<asp:Literal ID="Literal11" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN0000491%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <div class="form-group">
                                            <div class="form-line">
                                                <asp:TextBox runat="server" ID="TxBx_Email"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="RFV_TxBx_Email" runat="server" ControlToValidate="TxBx_Email"
                                                    ValidationGroup="accountinfo" SetFocusOnError="true" Display="None" ErrorMessage="<%$ Resources:Content,EM000001%>"></asp:RequiredFieldValidator>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <div class="card">
                            <div class="header">
                                <h3>
                                    <asp:Literal ID="Literal12" runat="server" EnableViewState="false" Text="<%$ Resources:Content,CompanyInfo%>" />
                                </h3>
                            </div>

                            <div class="body">
                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal13" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001134%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <asp:Literal ID="Ltl_Company" runat="server" EnableViewState="true" />
                                    </div>
                                </div>

                                <div class="row">
                                    <div class="col-sm-3 col-xs-12 row-label">
                                        <asp:Literal ID="Literal14" runat="server" EnableViewState="false" Text="<%$ Resources:Content,GN00001515%>" />:
                                    </div>
                                    <div class="col-sm-4 col-xs-12">
                                        <asp:Literal ID="Ltl_PrimaryContact" runat="server" EnableViewState="true" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-xs-12">
                        <asp:Button ID="Btn_UpdateAccountInfo" runat="server" Text="<%$ Resources:Content,GN0000654%>" ValidationGroup="accountinfo"
                            class="btn btn-primary waves-effect btnAction" CausesValidation="true" />
                        <asp:ValidationSummary ID="VS_accountinfo" runat="server" ValidationGroup="accountinfo" ShowMessageBox="true" ShowSummary="false" />
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script lang="javascript">
    function showAgreementModal() {
        $find('<%=MPE_AgreementDetails.ClientID%>').show();
    }
    function cancelAcceptAgreement() {
        $get('<%= Cb_AcceptMSAgreement.ClientID%>').checked = false;
    }
</script>
