<%--
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://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
<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.8);
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;
}
</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">
<i class="fas fa-key"></i>
<input type="password" class="form-input" name="password" id="password" placeholder="New Password">
<div id="eye">
<i class="far fa-eye"></i>
</div>
</div>
<span class="error" id="password-error-forgot"></span>
<input type="submit" name="btnforgotpass" value="SignUp" class="form-submit-password">
</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>
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 = "";
}
});
</script>
</body>
</html>