<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelfRegistrationOldVersion.aspx.cs" Inherits="Axium.Web.SelfRegistrationOldVersion" %>

<!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" />
    <script src="Includes/JQueryUI/js/jquery-3.5.1.min.js" type="text/javascript"></script>
    <script src="Includes/JQueryUI/js/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/jquery.numeric.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/dateControl.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 type="text/javascript">
        function RefreshParent() {
            window.parent.location.href = '/PatientAccess/Default.aspx'; //window.parent.location.href;
        }

        function setBirthdate() {
            var birthday = document.getElementById('DQ37297').value;
            document.getElementById('hdnBirthdate').value = birthday;
        }
        /*jquery validator library*/
        $(document).ready(function () {
            $('#SelfRegis').validate({
                errorPlacement: function (error, element) {
                    return true;
                },
                highlight: function (element, errorClass) {
                    var imgId = element.id + 'ImgError';            // Id of Image error 'must' be same as TextBox field + 'ImgError'
                    var imgCtrl = $(element.form).find('img[id=' + imgId + ']');
                    imgCtrl.addClass('imgErrorShow').removeClass('imgErrorHide');
                },
                unhighlight: function (element, errorClass) {
                    var imgId = element.id + 'ImgError';            // Name of Image error 'must' be same as input field + 'ImgError'
                    var imgCtrl = $(element.form).find('img[id=' + imgId + ']');
                    imgCtrl.removeClass('imgErrorShow').addClass('imgErrorHide');
                }
            });
        });
    </script>

</head>
<body>
    <form name="SelfRegis" id="SelfRegis" runat="server">
        <input id="hdnBirthdate" type="hidden" runat="server" />
        <div id = "SelfRegistration">
            <h1 id="PageTitle" runat="server"></h1>
            <asp:Literal ID="Notifications" runat="server" Visible="false" EnableViewState="false" />
            <div id="content1" class="SelfRegisInstructions" runat="server"></div>
            <div id="BirthdayDiv" class="dateClass">
                <asp:Label ID="BirthdayLabel" runat="server" EnableViewState="false" CssClass="title">Birth Date</asp:Label>
                <asp:Image ID="BirthdayDateCImgError" runat="server" ImageUrl="Includes/Images/unchecked.png" CssClass="imgErrorHide" />
                <br />
                <div id="BirthdayDateControlDiv" runat="server"></div>                
            </div>
            <div id="FirstNameDiv" class="inputRow">
                <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstNameTxt" EnableViewState="false" CssClass="title">First Name</asp:Label>
                <img id="FirstNameTxtImgError" alt="" src="Includes/Images/unchecked.png" class="imgErrorHide"/>
                <br />
                <asp:TextBox ID="FirstNameTxt" runat="server" CssClass="text required" MaxLength="15" />
            </div>
            <div id="EmailDiv" class="inputRowLong">
                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" EnableViewState="false" CssClass="title">Email</asp:Label>
                <asp:Image ID="EmailImgError" runat="server" ImageUrl="Includes/Images/unchecked.png" CssClass="imgErrorHide" />
                <br />
                <asp:TextBox ID="Email" runat="server" CssClass="textLong required email" MaxLength="100" />
            </div>
            <div Id="SubmitDiv" runat="server">
                <div class="submitClass">
                    <asp:Button ID="SubmitBtn" runat="server" EnableViewState="false" CssClass="button" Text="Send Email" OnClick="SubmitBtn_Click" OnClientClick="setBirthdate();" />                                    
                </div>
            </div>
            <asp:Literal ID="ErrorText" runat="server" Visible="false" EnableViewState="false" />
        
        </div>
    </form>
    
    <script type="text/javascript">
        jQuery(document).ready(function () {
            $(".integer").numeric(false, function () { this.value = ""; this.trigger('focus'); });       // AX-24898.24919.2 .focus()
            var childHeight = $(document).height() + 50;
            jQuery('#SelfRegistationIfrmId', window.parent.document).css('height', childHeight);
        });

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