diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-20 20:48:12 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-20 20:48:12 +0200 |
commit | b78e76a1cb68ffb374044851e9f96a0c7f463862 (patch) | |
tree | 06ec35e0efbc695e097d277da130d0051561cae4 /apps/encryption/js | |
parent | a13088818a73ecdf6f7d6600c011e0fa49054b51 (diff) | |
parent | 04674c06cca5884e6269461b2ae9a6e64a00953d (diff) | |
download | nextcloud-server-b78e76a1cb68ffb374044851e9f96a0c7f463862.tar.gz nextcloud-server-b78e76a1cb68ffb374044851e9f96a0c7f463862.zip |
Merge pull request #15677 from owncloud/enc_reset_private_key_password
[encryption] let user update the private key password
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(){ |