forgot

mail@pastecode.io avatar
unknown
plain_text
a month ago
6.8 kB
2
Indexable
Never
<%-- 
    Document   : forgot
    Created on : Oct 11, 2023, 12:10:29 AM
    Author     : MSI GTX
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />

        <style>
            body {
                background-color: brown;
                background: -webkit-linear-gradient(to left, #8E0E00, #581414);
                background: linear-gradient(to left, #8E0E00, #581414);
                background-size: cover;
                background-position-y: -80px;
                font-size: 20px;
                /* display: flex; */
                flex-direction: column;
                align-items: center;
                justify-content: center;
                height: 100vh;
                margin: 0;
            }

            #wrapper {
                min-height: 100vh;
                /*chiều cao tối thiểu như này là 100%*/
                display: flex;
                justify-content: center;
                align-items: center;
            }


            #form-forgot-password {
                max-width: 400px;
                background: rgba(0, 0, 0, 0.45);
                flex-grow: 1;
                padding: 30px 30px 60px;
                box-shadow: 0px 0px 17px 2px rgba(82, 46, 46, 0.8);
            }

            .form-heading {
                font-size: 50px;
                color: #ffffff;
                text-align: center;
                margin-bottom: 30px;
            }

            .form-group {
                border-bottom: 1px solid #fcfdff;
                margin-top: 15px;
                margin-bottom: 20px;
                display: flex;
            }

            .form-group i {
                color: #fff;
                font-size: 16px;
                padding-top: 5px;
                padding-right: 10px;
            }

            .form-input {
                background: transparent;
                width: 100%;
                padding: 10px;
                /*hiển thị ảnh nền tron suốt*/
                border: 0;
                outline: 0;
                color: #ffffff;
                flex-grow: 1;
                /*mở rộng phần tử bằng khoảng trắng*/
            }

            .form-input::placeholder {
                color: #ffffff;
            }

            #eye i {
                padding-right: 0;
                cursor: pointer;
            }

            .form-submit-password {
                background: transparent;
                border: 1px solid #ffffff;
                color: #fff;
                width: 100%;
                text-transform: uppercase;
                padding: 6px 10px;
                transition: 0.25s ease-in-out;
                margin-top: 30px;
            }

            .form-submit-password:hover {
                border: 1px solid #54a0ff;
            }

            .error {
                color: #fff;
                font-size: 16px;
                display: block;
                margin-top: 5px;
            }
            .material-symbols-rounded{
                color: white;
            }

        </style>
    </head>
    <body>
        <div id="wrapper">
            <!--form lấy lại mật khẩu-->
            <form action="AccountController" id="form-forgot-password" method="post">
                <h1 class="form-heading">New Password</h1>
                <div class="form-group">
                    <span class="material-symbols-rounded">lock</span>
                    <input type="password" class="form-input" name="password" id="password" placeholder="New Password">
                </div>

                <span class="error" id="password-error-forgot"></span>
                <input type="submit" name="btnforgotpass" value="SignUp" class="form-submit-password">
            </form>

            <form action="" id="form-pin-forgot" method="post">
                <h1 class="form-heading">authentication PIN:</h1>
                <div class="form-group">
                    <input type="text" class="form-input" name="pin-forgot" placeholder="Enter PIN" id="pin-forgot">
                </div>
                <span class="error" id="pin-error-forgot"></span>
                <input type="submit" name="submit-pin" value="Check PIN" class="form-submit">
                <input type="submit" name="delete" value="DELETE" class="form-submit">
            </form>

        </div>


        <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
        <script>
//             const backToLoginButton = document.getElementById("back-to-login");
//            const backToForgotButton = document.getElementById("back-to-forgot");
//            //hiển thị trang signup
//            document.getElementById("signup-button").addEventListener("click", function () {
//                loginForm.style.display = "none";
//                forgotForm.style.display = "none";
//                pinForm.style.display = "none";
//                signupForm.style.display = "block";
//            });
            document.getElementById("form-forgot-password").addEventListener("submit", function () {
                var passwordValue = document.getElementById("password").value;
                if (passwordValue.trim() === "") {
                    document.getElementById("password-error-forgot").innerText = "Please enter Password";
                    event.preventDefault();
                } else {
                    document.getElementById("password-error-forgot").innerText = "";
                }
            });
            document.getElementById("form-pin").addEventListener("submit", function (event) {
                var pin = document.getElementById("pin").value;
                if (pin.trim() === "") {
                    document.getElementById("pin-error").innerText = "Please enter PIN";
                    event.preventDefault();
                }
                document.getElementById("pin-error").innerText = "";

            });
        </script>



    </body>
</html>
Leave a Comment