-
Notifications
You must be signed in to change notification settings - Fork 3
/
changepassowrd.html
27 lines (27 loc) · 1.15 KB
/
changepassowrd.html
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
<html>
<form id='myForm' style="font-family:Georgia;">
<h1>Change Password</h1>
<table>
<tr><td>Old Password </td><td><input name='oldpassword' type='password' value="" ></td></tr>
<tr><td>New Password </td><td><input name='newpassword' type='password' value="" ></td></tr>
</table>
<div id="submitbuttcontainer"><img id="submitloader" style="display:none;" src='https://lh6.googleusercontent.com/-S87nMBe6KWE/TuB9dR48F0I/AAAAAAAAByQ/0Z96LirzDqg/s27/load.gif' />
<input id="submitbutt" type='button' onclick='showWorking();google.script.run.withSuccessHandler(onSuccess).changePassword(document.getElementById("myForm"));' name="Submit" value="Submit"></div>
</form>
<script>
function onSuccess(obj) {
document.getElementById('submitbutt').style.display="block";
document.getElementById('submitloader').style.display="none";
if(obj.status == 'done') {
google.script.host.closeDialog();
}
else {
alert("Incorrect Old Password. Please retry");
}
}
function showWorking() {
document.getElementById('submitbutt').style.display="none";
document.getElementById('submitloader').style.display="block";
}
</script>
</html>