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