<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelfRegistrationConfirm.aspx.cs" Inherits="Axium.Web.Users.SelfRegistrationConfirm" Title="Patient Registration" %>
<%@ Register TagPrefix="axi" TagName="CredentialRegister" Src="~/PatientAccess/Controls/CredentialsSelfRegister.ascx" %>
<%@ Register TagPrefix="axi" TagName="LogoImage" Src="~/PatientAccess/Controls/LogoImageControl.ascx" %>
<%@ Register TagPrefix="axi" TagName="ModalSpinner" Src="~/PatientAccess/Controls/ModalSpinner.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">
    <title></title>
    
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />

    <!-- //Todo: External style files, script and style compression and merge -->
    <!--[if lt IE 8]><style type="text/css">#questions h3{padding-top:5px;background-position:10px left;}#Login #Forgot{margin-left:11px;}div.links{position:relative;}div.links input.nextprevious{margin:0;position:absolute;top:20px;}.picker{margin-bottom:-22px;}</style><![endif]-->
    <!--[if lt IE 7]><style type="text/css">#Content{overflow:auto;}#MainContent{width:565px;margin-left:13px;}
        #SideBar ul.leftNav li a{background-position:3px 2px;padding:8px 5px 8px 20px;}#Login #Forgot{margin-left:6px;}.available,.unavailable{line-height:14px;}
        #MainContent h2.topHeader{width:565px;}#questions h3{background-position:5px left;}#iFormsListing li a{width:100%;}
        .jqmWindow,.jqmAlert,#logoutAlert{position: absolute;top: expression((document.documentElement.scrollTop || document.body.scrollTop) + Math.round(17 * (document.documentElement.offsetHeight || document.body.clientHeight) / 100) + 'px');width:300px;}#logoutAlert{left:40%;}#logoutAlert div.jqmAlertContent{display:block;clear:both;}
        iframe.jqm {position:absolute;top:0;left:0;z-index:-1;width: expression(this.parentNode.offsetWidth+'px');height: expression(this.parentNode.offsetHeight+'px');
        </style>
    <![endif]-->
    <script src="../Includes/Scripts/jquery-3.5.1.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jquery-migrate-3.3.2.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/json2.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/utilities.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jqModal-r14.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/ui.datepicker.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jquery.maxlength-1.0.3.min.js" type="text/javascript"></script>    
    <script src="../Includes/Scripts/jquery.timer.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/jquery.validate-1.19.2.min.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/PA2.0/common.js" type="text/javascript"></script>
    <script src="../Includes/Scripts/PA2.0/pendo.js" type="text/javascript"></script>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js" type="text/javascript" integrity="sha384-HwwvtgBNo3bZJJLYd8oVXjrBZt8cqVSpeBNS5n7C8IVInixGAoxmnlMuBnhbgrkm" crossorigin="anonymous"></script>
    <script src="../Includes/Scripts/PA2.0/getOneTimeCode.js" type="text/javascript"></script>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous" />
    <link rel="stylesheet" href="../includes/css/selfRegistration.css" />
    <link rel="stylesheet" href="../Includes/Css/PA2.0/common.css" />
    <link rel="stylesheet" href="../Includes/Css/PA2.0/getOneTimeCode.css"/>

    <script type="text/javascript">
        // AX-25635 Refresh Default Page
        function RefreshParentDefault() {
            window.parent.location.href = '/PatientAccess/Default.aspx';
        }

    </script>

</head>
<body>
    
    <form name="aspnetForm" method="post" action="SelfRegistrationConfirm.aspx" id="aspnetForm" runat="server" autocomplete="off" class="needs-validation m-0 p-0" novalidate>
        <asp:HiddenField runat="server" ClientIDMode="Static" ID="SelfRegistrationAllowChangeUsername" />
        <asp:HiddenField runat="server" ClientIDMode="Static" ID="UsernameRegex" />
        <asp:HiddenField runat="server" ClientIDMode="Static" ID="DefaultUsername" />
        <asp:HiddenField ID="HdnLogoImgTopPosition" runat="server" ClientIDMode="Static" />
        <div id="containerId" class="container">

            <div class="otp-main-content">

                <div class="university-logo-container">
                    <axi:LogoImage ID="LogoImage1" runat="server" CssImage="university-logo" />
                </div>

                <div id="RegisterFormContainer" runat="server" class="text-container">

                    <asp:HiddenField ID="IsOtp" runat="server" />
                    <div id="Credentials">
                        <div id="PageTitle" runat="server" class="text-register-access">
                            Create Account
                        </div>
                        <div id="content1" runat="server" class="description">
                            <b>Step 4:</b>&nbsp;Create your username and password to complete the registration process.
                        </div>
                        <div id="content2" runat="server" class="mt-4">
                            <axi:CredentialRegister ID="Creds" runat="server" />
                        </div>
                        <input id="hdnId" type="hidden" runat="server"/>
                        <asp:PlaceHolder ID="AutoLogout" runat="server" Visible="false" EnableViewState="false" />
                    </div>
                    
                    <div class="text-center w-100">
                        <asp:Button ID="UpdateBtnDesktop" runat="server" CssClass="btn btn-pa btn-primary desktop-submit-btn HideOnMobile" AccessKey="l" OnClick="UpdateButton_Click" OnClientClick="return handleSubmit();" EnableViewState="false" Text="Register" />
                    </div>
                    <asp:Literal ID="Notifications" runat="server" Visible="false" EnableViewState="false" />
                    <div class="validationError validation">
                        <ul>
                        </ul>
                    </div>
                    
                    <axi:ModalSpinner ID="ModalSpinner" runat="server"/>
                </div>

            </div>
            
            <div id="ButtonDiv" class="buttons mx-3 mt-4">
                <asp:Button ID="Update" runat="server" CssClass="btn btn-pa btn-primary confirm-update-btn w-100 ShowOnMobile" AccessKey="l" OnClick="UpdateButton_Click"
                    OnClientClick="return handleSubmit();" EnableViewState="false" Text="Register" />

            </div>
            <asp:Label ID="CopyrightLabel" CssClass="copyright" runat="server"></asp:Label>
        </div>
    </form>
        
    <div class="HideOnMobile">
        <div id="welcomeIfrmId" class="welcome-iframe-box">
            <iframe class="welcome-iframe" src='/PatientAccess/WelcomeToPA.aspx'></iframe>
        </div>
    </div>
    <script src="../Includes/Scripts/PA2.0/SelfRegistrationUsernameValidator.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            extendValidationCheck();
        });

        function handleSubmit() {
            openModalSpinner();

            var isValid = ($('#aspnetForm').valid());

            if (!isValid) {
                closeModalSpinner();
            }

            return isValid;
        }

    </script>
</body>
</html>
