<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ResetPassword.aspx.vb" Inherits="DriverPortal.ResetPassword1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <div class="container">
        <div class="login-form">

            <h3 class="text-center">Driver Password Reset</h3>

            <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtPassword" Text="New Password" />
                <asp:TextBox ID="txtPassword" runat="server" CssClass="form-control" required autofocus />
            </div>
            <div class="form-group">
                <asp:Label runat="server" AssociatedControlID="txtPassword2" Text="Re-enter Password" />
                <asp:TextBox ID="txtPassword2" runat="server" 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 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="btnReset" runat="server" Text="Reset Password"
                        CssClass="btn btn-primary btn-block" />
                </div>
            </div>

        </div>
    </div>

</asp:Content>
