BBnepal-Accounts/hr/application/views/bustracking-admin/forgot-password.php

156 lines
5.2 KiB
PHP
Raw Permalink Normal View History

2024-07-10 12:43:19 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ERISN Classroom</title>
<!--styles links-->
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/jquery-ui.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/font-family.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/all.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/owl-carousel/css/owl.carousel.min.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/fontawesome.min.css" />
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/style-admin.css">
<link rel="stylesheet" href="<?php echo base_url(); ?>assets-bustracking/css/style-admin-responsive.css">
</head>
<body>
<div class="login-wrap">
<div class="logo-wrap">
<a href='<?php echo base_url() . 'admin'; ?>'>
<img src="<?php echo base_url(); ?>assets-bustracking/images/erisn-blue.png">
</a>
</div>
<?php
$isForgotPasswordSuccess = 'No';
if ($this->session->userdata('isForgotPasswordSuccess')) {
$isForgotPasswordSuccess = 'Yes';
$this->session->unset_userdata('isForgotPasswordSuccess');
}
?>
<?php
$eid = '';
if (count($_POST) > 0) {
$eid = $_POST['email'];
}
?>
<img src="<?php echo base_url(); ?>assets-bustracking/images/login.png" class="login-img">
<div class="login-box-cover">
<div class="login-box">
<h3>Forgot Password?</h3>
<form action='<?php base_url() . 'forgot-password'; ?>' id="forgotPasswordForm" method="post">
<div class="login-row">
<p>Please enter your email address for sending link to change password.</p>
</div>
<div class="login-row">
<label class="login-lbl">
Email Address*
</label>
<input type="text" name="email" id="email" value='<?php echo $eid; ?>' placeholder="Enter your email address">
<p class="form_err" id='email_error'></p>
<span class="form_err"><?php echo form_error('email'); ?><span>
</div>
<div class="login-row">
<button class="common-btn" type='button' onclick='validate_fp_form()'>Submit</button>
</div>
</form>
<div class="backto-login">
<a href="<?php echo base_url() . 'admin'; ?>"> &lt Back to login </a>
</div>
</div>
</div>
</div>
<div class="passwdChange_modal">
<div class="modal fade" id="passwordChangeModal" role="dialog" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<i class="fas fa-check-circle"></i>
<h4 class="modal-title">Success</h4>
</div>
<div class="modal-body">
An email has been sent to your registered email address which has a link to reset your password.
</div>
<div class="modal-footer">
<div class="dashboard-btn-wrap">
<button class="common-btn" onclick='go_to_admin_login()'>Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-ui.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/popper.min.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/js/bootstrap.min.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/all.js"></script>
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/main.js"></script>
<script src="<?php echo base_url(); ?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
<script type="text/javascript">
var isForgotPasswordSuccess = '<?php echo $isForgotPasswordSuccess; ?>';
if (isForgotPasswordSuccess == 'Yes') {
$('#passwordChangeModal').modal('show');
}
function go_to_admin_login() {
window.location = '<?php echo base_url() . "admin"; ?>';
}
$(document).ready(function() {
$(document).on('keypress', function(e) {
if (e.which == 13) {
//if(js_status != 'Not Verified')
validate_fp_form();
}
});
});
function hide_all_fp_errors() {
$('#email_error').hide();
$('#password_error').hide();
}
function validate_fp_form() {
hide_all_fp_errors();
var errArr = new Array();
var lemail = $('#email').val().trim();
var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (lemail == '') {
errArr.push('email_Sep@Str_Please enter your email address.');
} else if (!regex.test(lemail)) {
errArr.push('email_Sep@Str_Please enter a valid email address.');
}
if (errArr.length > 0) {
for (i = 0; i < errArr.length; i++) {
var resArr = errArr[i].split("_Sep@Str_");
$("#" + resArr[0] + "_error").html(resArr[1]);;
$("#" + resArr[0] + "_error").show();
}
var xxxVal = errArr[0].split('_Sep@Str_');
$('#' + xxxVal[0]).focus();
return false;
} else {
$('#forgotPasswordForm').submit();
}
}
</script>
</body>
</html>