-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforget.ejs
71 lines (63 loc) · 1.97 KB
/
forget.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<title>Forget Password</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="./css/main.css">
<script type="text/javascript">
$(document).ready(function(){
$( "#form2" ).submit(function(event) {
event.preventDefault();
$.ajax({
type: 'POST',
url: '/forgetpass',
data: $('#form2').serialize(),
dataType: "json",
success: function(response){
//alert("a");
//console.log(response.Success);
$('#form2')[0].reset();
//alert("abc");
document.getElementById("check").innerHTML=response.Success;
setTimeout(function(){
document.getElementById("check").innerHTML="";
},3000);
if (response.Success=="Password changed!") {
document.getElementById("aa").click();
};
},
error: function() {
}
})
});
});
</script>
</head>
<body>
<div class="col-md-4 col-md-offset-4">
<div>
<p>Change Password</p>
</div>
<div class="form-group">
<form id="form2" method="post">
<input type="text" name="email" placeholder="E-mail" required="" class="form-control"><br/>
<input type="password" name="password" placeholder="Password" required="" class="form-control"><br/>
<input type="password" name="passwordConf" placeholder="Confirm Password" required="" class="form-control"><br/>
<input type="submit" value="Change" class="btn btn-success">
</form>
</div>
<div class="mssg bg-danger">
<span id="check"></span>
</div>
<div id="LangTable"><a href="/profile" id="aa"></a>
</div>
<div><span>Login?</span><a href="/login">Click here</a></div>
</div>
<div id="LangTable"><a href="/login" id="aa"></a>
</div>
</div>
</body>
</html>