-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathchange_password.html
More file actions
93 lines (71 loc) · 3.7 KB
/
change_password.html
File metadata and controls
93 lines (71 loc) · 3.7 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Alef|Varela+Round&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="img/icons/logo_icon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/mefathim.css">
<link rel="stylesheet" href="css/mefathim.css">
<script src="js/load.js"></script>
<title>שינוי סיסמה</title>
</head>
<body >
<nav id="nav" class="navbar navbar-expand-sm bg-light navbar-light fixed-top"></nav>
<div id="now_logged" style="padding-top: 50px;"></div>
<div class="container">
<h2 style="margin-top: 70px;">שינוי סיסמא</h2>
<div class="card card-container">
<div >
<input type="password" id="old_password" name="old_password" class="form-control" placeholder="הזן את הסיסמה הנוכחית" required>
<input type="password" id="password1" name="password1" class="form-control" placeholder="הזן סיסמה חדשה" required>
<input type="password" id="password2" name="password2" class="form-control" placeholder="הזן סיסמה שוב" required>
<center><div id="err"></div></center>
<button class="btn btn-primary" id="send">אישור</button>
<input class="btn btn-primary" id="clear" value="נקה">
</div>
</div>
</div>
<center><p> גירסה:0.0008 ©</p></center>
<script>
$(document).ready(function(){
buildnavbar();
get_connected_users();
$("#send").click(function()
{
if ($("#password1").val() === $("#password2").val()){
$.post("scripts/change_password.py",
{
old_password : $("#old_password").val(),
password1: $("#password1").val(),
password2: $("#password2").val(),
}, function(res)
{
let result = JSON.parse(res);
if (result.ok==true){
$("#err").html("הסיסמה שונתה");
clear();
}
else{
$("#err").html("אחד הנתונים שגוי");
}
});
}
else { $("#err").html("אחד הנתונים שגוי"); }
});
$("#clear").click(function()
{
clear();
});
});
function clear(){
$("#password1").val("");
$("#password2").val("");
$("#old_password").val("");
}
</script>
</body>
</html>