EVOLUTION-NINJA
Edit File: faculty_forgot_password.php
<!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"> <meta name="description" content=""> <meta name="author" content=""> <title>AMCAD</title> <!-- user css --> <link href="<?php echo base_url('public/assets/css/avinash.css') ?>" rel="stylesheet"> <!-- Bootstrap Core CSS --> <link href="<?php echo base_url('public/assets/css/bootstrap.min.css') ?>" rel="stylesheet"> <!-- MetisMenu CSS --> <link href="<?php echo base_url('public/assets/css/metisMenu.min.css') ?>" rel="stylesheet"> <!-- Timeline CSS --> <link href="<?php echo base_url('public/assets/css/timeline.css') ?>" rel="stylesheet"> <!-- Custom CSS --> <link href="<?php echo base_url('public/assets/css/sb-admin-2.css') ?>" rel="stylesheet"> <!-- Morris Charts CSS --> <link href="<?php echo base_url('public/assets/css/morris.css') ?>" rel="stylesheet"> <!-- Custom Fonts --> <link href="<?php echo base_url('public/assets/css/font-awesome.min.css') ?>" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="<?php echo base_url('public/assets/toastr/toastr.min.css'); ?>"> </head> <body> <div id="wrapper" class="wrapper"> <div class="container"> <div class="login-logo"> <a href="../../index.html"><img src="<?php echo base_url('public/assets/images/Logo_AMCAD.png') ?>" class="img-responsive center-block"></a> </div> <div class="col-sm-offset-3 col-sm-6 col-md-offset-3 col-md-6 col-lg-offset-4 col-lg-4"> <form method="post" id="form_3" class="forgort_password_form"> <div class="form-group"> <div class="input-group"> <div class="input-group-addon"><i class="fa fa-user"></i></div> <input type="text" class="form-control" id="femail" pattern="[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,}|[.]{1}[a-zA-Z]{2,}[.]{1}[a-zA-Z]{2,})" name="email" placeholder="Email" required> </div> </div> <button type="submit" id="reset_btn" class="btn btn-block btn-success bt-login reset_password_btn" data-loading-text="Please wait....">Submit</button> <div class="clearfix"></div> </form> </div> </div> </div> <!-- /#wrapper --> <style> .wrapper { padding-top: 15%; background: url("public/assets/website_assets/images/banner.png"); background-size: cover; height: 100vh; } </style> <!-- jQuery --> <script src="<?php echo base_url('public/assets/js/jquery.min.js') ?>"></script> <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> --> <!-- Bootstrap Core JavaScript --> <script src="<?php echo base_url('public/assets/js/bootstrap.min.js') ?>"></script> <script type="text/javascript" src="<?php echo base_url('public/assets/toastr/toastr.min.js'); ?>"></script> <script type="text/javascript"> $(document).ready(function() { $('.forgort_password_form').submit(function(e) { e.preventDefault(); formdata = new FormData($(this)[0]); $(".reset_password_btn").attr('disabled', 'disabled'); $(".reset_password_btn").text("Submitting..."); $.ajax({ type: 'post', url: '<?php echo site_url("faculty_forgot_pswd") ?>', data: formdata, contentType: false, processData: false, success: function(response) { // response = jQuery.parseJSON(response); console.log(response); if (response.result == 1) { toastr["success"](response.message); $('.forgort_password_form')[0].reset(); $(".reset_password_btn").text("Submit"); $(".reset_password_btn").removeAttr('disabled'); setTimeout(function wait() { window.location = '<?php echo site_url("/faculty") ?>'; }, 1000); } else if (response.result == 2) { toastr["error"](response.message); $(".reset_password_btn").text("Submit"); $(".reset_password_btn").removeAttr('disabled'); } else { toastr["error"](response.message); $(".reset_password_btn").text("Submit"); $(".reset_password_btn").removeAttr('disabled'); } } }); }); }); </script> </body> </html>