diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-08-09 17:25:57 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-08-09 17:25:57 +0200 |
commit | 368ade6b2faef1d7ee0095b3921f285c62ba3a8f (patch) | |
tree | 5e0f2502d04671f1016a536ec363d2b6e6e355b2 /apps/files_encryption/js/settings-personal.js | |
parent | bd7d5667330e1f9c8674602ea489805def2ba4f4 (diff) | |
download | nextcloud-server-368ade6b2faef1d7ee0095b3921f285c62ba3a8f.tar.gz nextcloud-server-368ade6b2faef1d7ee0095b3921f285c62ba3a8f.zip |
code cleanup
Diffstat (limited to 'apps/files_encryption/js/settings-personal.js')
-rw-r--r-- | apps/files_encryption/js/settings-personal.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/files_encryption/js/settings-personal.js b/apps/files_encryption/js/settings-personal.js index d70f9318e5d..8afea6d77df 100644 --- a/apps/files_encryption/js/settings-personal.js +++ b/apps/files_encryption/js/settings-personal.js @@ -14,18 +14,20 @@ $(document).ready(function(){ if (client) { $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'client' }); if (prevmode == 'server') { - OC.dialogs.info(t('encryption', 'Please go to your owncloud client and change your encryption password to complete the conversion'), t('encryption', 'switched to client side encryption')); + OC.dialogs.info(t('encryption', 'Please switch to your ownCloud client and change your encryption password to complete the conversion.'), t('encryption', 'switched to client side encryption')); } } else if (server) { if (prevmode == 'client') { - OC.dialogs.form([{text:'login password', name:'newpasswd', type:'password'},{text:'Encryption password used on the client', name:'oldpasswd', type:'password'}],t('encryption', 'Change encryption password to login password'), function(data) { - $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server', newpasswd: data[0].value, oldpasswd: data[1].value }, function(result) { - if (result.status != 'success') { - document.getElementById(prevmode+'_encryption').checked = true; - OC.dialogs.alert(t('encryption', 'Please check your passwords and try again'), t('encryption', 'Could not change your file encryption password to your login password')) - } - }); - }); + OC.dialogs.form([{text:'login password', name:'newpasswd', type:'password'},{text:'Encryption password used on the client', name:'oldpasswd', type:'password'}],t('encryption', 'Change encryption password to login password'), function(data) { + $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server', newpasswd: data[0].value, oldpasswd: data[1].value }, function(result) { + if (result.status != 'success') { + document.getElementById(prevmode+'_encryption').checked = true; + OC.dialogs.alert(t('encryption', 'Please check your passwords and try again.'), t('encryption', 'Could not change your file encryption password to your login password')) + } else { + console.log("alles super"); + } + }, true); + }); } else { $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server' }); } |