<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Public.master" CodeBehind="CreateAccount2.aspx.vb" Inherits="Web.CreateAccount2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phContent" runat="server">

    <div class="container">
        <h2>Create Driver Account</h2>
		<h5 style="padding-bottom: 5px">You must create a driver account in order to complete an online application for employment.</h5>
        
        <asp:PlaceHolder ID="phIncomplete" runat="server" Visible="false">
            <div class="alert alert-danger alert-dismissible">
                Please fill out the form fully.
                <button type="button" class="close" data-dismiss="alert">&times;</button>
            </div>
        </asp:PlaceHolder>
        <asp:PlaceHolder ID="phUserExists" runat="server" Visible="false">
            <div class="alert alert-danger alert-dismissible">
                A user already exists for that email address.
                <button type="button" class="close" data-dismiss="alert">&times;</button>
            </div>
        </asp:PlaceHolder>

        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="txtEmail" Text="Email Address" />
            <asp:TextBox ID="txtEmail" runat="server" MaxLength="128" CssClass="form-control" autofocus required />
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtPassword" Text="Password" />
                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" MaxLength="50" CssClass="form-control" required />
            </div>
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtPassword2" Text="Re-enter password" />
                <asp:TextBox ID="txtPassword2" runat="server" TextMode="Password" MaxLength="50" CssClass="form-control" required />
                <asp:CustomValidator runat="server" ControlToValidate="txtPassword2" ClientValidationFunction="txtPassword2_ClientValidate"
                    Text="Must match password" Display="Dynamic" CssClass="text-danger" />
                <script type="text/javascript">
                    function txtPassword2_ClientValidate(sender, e) {
                        var txtPassword = $('#<%= txtPassword.ClientID %>');
                        var txtPassword2 = $('#<%= txtPassword2.ClientID %>');
                        e.IsValid = txtPassword.val() === txtPassword2.val();
                    }
                </script>
            </div>
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtNameFirst" Text="First Name" />
                <asp:TextBox ID="txtNameFirst" runat="server" MaxLength="50" CssClass="form-control" required />
            </div>
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtNameMiddle" Text="Middle Name" />
                <asp:TextBox ID="txtNameMiddle" runat="server" MaxLength="50" CssClass="form-control" />
            </div>
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtNameLast" Text="Last Name" />
                <asp:TextBox ID="txtNameLast" runat="server" MaxLength="50" CssClass="form-control" required />
            </div>
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtNameSuffix" Text="Suffix" />
                <asp:TextBox ID="txtNameSuffix" runat="server" MaxLength="50" CssClass="form-control" />
            </div>
        </div>
        <div class="row">
            <div class="form-group col">
                <asp:Label runat="server" AssociatedControlID="txtPhone" Text="Phone Number" />
                <asp:TextBox ID="txtPhone" runat="server" TextMode="Phone" MaxLength="50" CssClass="form-control" required />
            </div>
        </div>
            
        <div class="row">
            <div class="d-none"><asp:Button ID="btnDefault" runat="server" /></div>
            <div class="col">
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false"
                    CssClass="btn btn-secondary btn-block" formnovalidate />
            </div>
            <div class="col">
                <asp:Button ID="btnCreate" runat="server" Text="Create Account"
                    CssClass="btn btn-primary btn-block" />
            </div>
        </div>
		 <h5 class="mt-3 text-center">Already Have an Account?<a href="login2.aspx"> Login Here!</a></h5>
    </div>

</asp:Content>
