diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-20 18:15:06 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-20 18:26:14 +0200 |
commit | 04674c06cca5884e6269461b2ae9a6e64a00953d (patch) | |
tree | fee4148cf9fc8166effe886b9574c8b3175543a0 /apps/encryption/js | |
parent | 3f96662609a93f4da653c5962175ae42f4768fc1 (diff) | |
download | nextcloud-server-04674c06cca5884e6269461b2ae9a6e64a00953d.tar.gz nextcloud-server-04674c06cca5884e6269461b2ae9a6e64a00953d.zip |
Dont use the old .status way
Diffstat (limited to 'apps/encryption/js')
-rw-r--r-- | apps/encryption/js/settings-personal.js | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/apps/encryption/js/settings-personal.js b/apps/encryption/js/settings-personal.js index dcfbba4ecde..68609877c05 100644 --- a/apps/encryption/js/settings-personal.js +++ b/apps/encryption/js/settings-personal.js @@ -9,16 +9,13 @@ function updatePrivateKeyPasswd() { var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); OC.msg.startSaving('#encryption .msg'); $.post( - OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword') - , { oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword } - , function( data ) { - if (data.status === "error") { - OC.msg.finishedSaving('#encryption .msg', data); - } else { - OC.msg.finishedSaving('#encryption .msg', data); - } - } - ); + OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'), + { oldPassword: oldPrivateKeyPassword, newPassword: newPrivateKeyPassword } + ).success(function(response) { + OC.msg.finishedSuccess('#encryption .msg', response.message); + }).fail(function(response) { + OC.msg.finishedError('#encryption .msg', response.responseJSON.message); + }); } $(document).ready(function(){ |