summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/personal.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index d61a08794cc..3079cf27e06 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -235,19 +235,18 @@ $(document).ready(function () {
$(".personal-show-label").show();
$('#pass1').val('');
$('#pass2').val('').change();
+ }
+ if (typeof(data.data) !== "undefined") {
+ OC.msg.finishedSaving('#password-error-msg', data);
} else {
- if (typeof(data.data) !== "undefined") {
- OC.msg.finishedSaving('#password-error-msg', data);
- } else {
- OC.msg.finishedSaving('#password-error-msg',
- {
- 'status' : 'error',
- 'data' : {
- 'message' : t('core', 'Unable to change password')
- }
+ OC.msg.finishedSaving('#password-error-msg',
+ {
+ 'status' : 'error',
+ 'data' : {
+ 'message' : t('core', 'Unable to change password')
}
- );
- }
+ }
+ );
}
$(".password-loading").remove();
$("#passwordbutton").removeAttr('disabled');