chess/application/views/pages/reset_password.php

209 lines
7.3 KiB
PHP
Raw Normal View History

2024-03-08 13:03:59 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>
<style>
h3 {
font-size: 24px;
line-height: 30px;
}
label {
font-size: 12px;
}
.request-otp-header {
margin: 40px 0px;
}
.login-label label {
color: #0bbc8a;
font-weight: 600;
font-size: 12px;
}
.input-edit {
border: none !important;
border-bottom: 2px solid #ccc !important;
padding: 6px 0px;
opacity: 0.8;
}
.input-edit:focus {
border-bottom-color: #c74032 !important;
box-shadow: none;
outline: 0;
}
.request-otp {
margin-top: 40px;
background: linear-gradient(#225779, #225779);
font-size: 14px;
color: #fff;
}
.request-otp:focus {
box-shadow: none;
}
.fa-chevron-left {
cursor: pointer;
}
.resend-otp {
margin-top: 6px;
cursor: pointer;
}
</style>
<body>
<div class="container-fluid">
<div class="row" style="align-items:center;">
<div class="col-md-6">
<!-- <img src="assets/images/main_logo.jpg" alt="" style="width:100px;"> -->
<div class="container new-login-area">
<div id='sign-in' class='login-setup-section'>
<h3 class="request-otp-header">Reset Password</h3>
<!-- <h6>Please log in with your registered details
All fields are Mandatory</h6> -->
<div class="alert alert-success alert-dismissible" id="success" style="display:none;">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
</div>
<div class="alert alert-danger alert-dismissible" id="error" style="display:none;">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
</div>
<div class="form-group login-label">
<label for="password">New Password</label>
<input type="password" name="password" id="password" class="form-control input-edit " placeholder=''>
</div>
<div class="form-group login-label">
<label for="password">Confirm Password</label>
<input type="password" name="confirm_password" id="confirm_password" class="form-control input-edit " placeholder=''>
</div>
<input type="hidden" value="<?php echo $this->input->get('email');?>" id="email" required>
<input type="hidden" value="<?php echo $this->input->get('email_token');?>" id="token" required>
<button type="button" id="btnRpass" class="btn btn-default btn-lg btn-block request-otp">Submit</button>
<!-- <div class=" mt-3 text-center">
<a class="text-danger" href="<?php echo base_url('sign_up')?>" style="font-size:15px;">
Forgot Your Password?
</a>
</div>
<div class="d-flex mt-3">
<p style="font-size: 13px;">Are you new Customer?</p><a
href="<?php echo base_url('sign_up')?>" style="font-size:13px;">
SIGN UP
</a>
</div>
<p style="font-size: 13px;">You agree to <a href="<?php echo base_url('terms')?>">Terms of
Use</a> & <a href="<?php echo base_url('privacy')?>">Privacy
Policy</a> Low Interest Loan
.</p> -->
</div>
</div>
</div>
<div class="col-md-6" style="padding-right: 0;">
<div class="container new-login-area" style="height:100vh;
padding-right:0;">
<img src="<?php echo base_url();?>assets/images/sign_in.gif" alt="Borrow - Loan Company Responsive Website Templates"
style="width:100%;height:100%;object-fit:cover;" />
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script>
// $('#verify-otp').hide();
// $('#request-otp').on('click', function() {
// $('#sign-in').hide();
// $('#verify-otp').show();
// });
// $('.fa-chevron-left').on('click', function() {
// $('#sign-in').show();
// $('#verify-otp').hide();
// });
</script>
<script>
$(document).ready(function() {
$('#btnRpass').on('click', function() {
var password = $('#password').val();
var cpassword = $('#confirm_password').val();
var email = $('#email').val();
var token = $('#token').val();
if(password != ""){
$.ajax({
url: "<?php echo base_url();?>Common_controller/forgot_pass_check",
type: "POST",
data: {
email:email,
token:token,
password: password,
cpassword: cpassword,
},
cache: false,
success: function(dataResult){
var dataResult = JSON.parse(dataResult);
if(dataResult.statusCode==201){
$("#error").show();
$('#error').html('Password and Confirmed Password Does not Match !');
}
else if(dataResult.statusCode==202){
$("#error").show();
$('#error').html('token has expired!');
}
else if(dataResult.statusCode==200){
$("#success").show(); $("#error").hide();
$('#success').html('Password Changed Successfully !');
//location.href = "welcome.php";
window.setTimeout(function() {
window.location.href = '<?php echo base_url();?>';
}, 10000);
}
else if(dataResult.statusCode==204){
$("#error").show();
$('#error').html('Something went wrong try again later.');
}
}
});
}
else{
$("#error").show();
$('#error').html('Please fill all the field !');
// alert('Please fill all the field !');
}
});
});
</script>
</body>
</html>