Disables teh button when clicked change password.

This commit is contained in:
Raghu Nayyar 2016-09-01 10:42:09 +02:00
parent cb6e16ab5c
commit 682ed7ff8f
1 changed files with 2 additions and 1 deletions

View File

@ -210,6 +210,7 @@ $(document).ready(function () {
var post = $("#passwordform").serialize(); var post = $("#passwordform").serialize();
$('#passwordchanged').hide(); $('#passwordchanged').hide();
$('#passworderror').hide(); $('#passworderror').hide();
$("#passwordbutton").attr('disabled', 'disabled');
// Ajax foo // Ajax foo
$.post(OC.generateUrl('/settings/personal/changepassword'), post, function (data) { $.post(OC.generateUrl('/settings/personal/changepassword'), post, function (data) {
if (data.status === "success") { if (data.status === "success") {
@ -230,6 +231,7 @@ $(document).ready(function () {
); );
} }
} }
$("#passwordbutton").removeAttr('disabled');
}); });
return false; return false;
} else { } else {
@ -243,7 +245,6 @@ $(document).ready(function () {
); );
return false; return false;
} }
}); });
$('#displayName').keyUpDelayedOrEnter(changeDisplayName); $('#displayName').keyUpDelayedOrEnter(changeDisplayName);