| Current Path : /home/emeraadmin/public_html/pages/ |
| Current File : /home/emeraadmin/public_html/pages/forgot-password.html |
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Login | ThemeKit - Admin Template</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="../cropped-emera-holdings-favicon-1-32x32.png" type="image/x-icon" />
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:300,400,600,700,800" rel="stylesheet">
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../node_modules/@fortawesome/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="../node_modules/ionicons/dist/css/ionicons.min.css">
<link rel="stylesheet" href="../node_modules/icon-kit/dist/css/iconkit.min.css">
<link rel="stylesheet" href="../node_modules/perfect-scrollbar/css/perfect-scrollbar.css">
<link rel="stylesheet" href="../dist/css/theme.min.css">
<script src="../src/js/vendor/modernizr-2.8.3.min.js"></script>
<style>
.auth-wrapper {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.lavalite-bg {
background-size: cover;
background-position: center;
height: 100%;
}
.center-image {
display: block;
margin: 0 auto;
}
.authentication-form {
width: 100%;
max-width: 400px;
padding: 30px;
}
.form-group {
margin-bottom: 20px;
}
.sign-btn .btn-theme {
width: 100%;
}
.register {
text-align: center;
margin-top: 20px;
}
</style>
</head>
<body>
<div class="auth-wrapper">
<div class="container-fluid h-100">
<div class="row flex-row h-100 bg-white">
<div class="col-xl-4 col-lg-6 col-md-5 p-0 d-md-block d-lg-block d-sm-none d-none">
<!-- <div class="lavalite-bg" style="background-image: url(../src/img/cover.jpg)"></div>-->
</div>
<div class="col-xl-4 col-lg-6 col-md-7 my-auto p-0 d-flex align-items-center justify-content-center">
<div class="authentication-form mx-auto">
<img src="../src/img/Emera-Primary-Logo.png" alt="Emera Logo" style="height: 100px; align-items: center; display: block; margin-left: auto; margin-right: auto;">
<p class="text-center">Enter your email to reset your password</p>
<form method="post" name="forgot-password" id="forgot-password">
<div class="form-group">
<input type="email" class="form-control" name="email" placeholder="Email" required>
</div>
<div class="sign-btn text-center">
<button class="btn btn-theme" type="submit">Reset Password</button>
</div>
<div id="forgot-password-error" class="alert alert-danger d-none mt-3"></div>
<div id="forgot-password-success" class="alert alert-success d-none mt-3"></div>
</form>
<div class="register">
<p>Remembered? <a href="login.php">Sign In</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script>window.jQuery || document.write('<script src="../src/js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
<script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../node_modules/sweetalert2/dist/sweetalert2.all.min.js"></script>
<script src="../dist/js/theme.js"></script>
<script>
$(document).ready(function(){
$("#forgot-password").submit(function(e){
e.preventDefault();
// Disable the button to prevent multiple clicks
$("#forgot-password button").prop("disabled", true);
// Show a Toast notification indicating that the request is being processed
Swal.fire({
icon: 'info',
title: 'Processing...',
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 1500
});
var email = $("input[name='email']").val();
$.ajax({
url: 'send_reset_link.php',
type: 'POST',
data: {email: email},
success: function(response){
if (response.includes("Email sent")) {
Swal.fire({
icon: 'success',
title: 'Success!',
text: response,
showConfirmButton: false,
timer: 2000
});
$("#forgot-password-success").text(response).removeClass("d-none");
} else {
Swal.fire({
icon: 'error',
title: 'Oops...',
text: response
});
$("#forgot-password-error").text(response).removeClass("d-none");
}
},
error: function(){
Swal.fire({
icon: 'error',
title: 'Oops...',
text: 'An error occurred. Please try again.'
});
$("#forgot-password-error").text("An error occurred. Please try again.").removeClass("d-none");
},
complete: function(){
// Re-enable the button after AJAX completes
$("#forgot-password button").prop("disabled", false);
}
});
});
});
</script>
</body>
</html>