diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-17 18:04:07 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-20 20:51:15 +0200 |
commit | 55962c5f5ad0e03618a0a3c1267d72c8f607e2dd (patch) | |
tree | 3868357e79c67cb75b91feca5e5cbfe680eaff5e /apps/encryption/js/settings-admin.js | |
parent | 3bc5c1c3cf285baa4d0ceabaa09c49f85c1ae4f8 (diff) | |
download | nextcloud-server-55962c5f5ad0e03618a0a3c1267d72c8f607e2dd.tar.gz nextcloud-server-55962c5f5ad0e03618a0a3c1267d72c8f607e2dd.zip |
make jshint happy
This reverts commit ae681f0061f534b48b45cf9a41f6110c0ff20b1d.
Diffstat (limited to 'apps/encryption/js/settings-admin.js')
-rw-r--r-- | apps/encryption/js/settings-admin.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/apps/encryption/js/settings-admin.js b/apps/encryption/js/settings-admin.js index 36765adf3e4..bb539f6a4e2 100644 --- a/apps/encryption/js/settings-admin.js +++ b/apps/encryption/js/settings-admin.js @@ -12,17 +12,20 @@ $(document).ready(function(){ $( 'input:radio[name="adminEnableRecovery"]' ).change( function() { var recoveryStatus = $( this ).val(); - var oldStatus = (1+parseInt(recoveryStatus)) % 2; + var oldStatus = (1+parseInt(recoveryStatus, 10)) % 2; var recoveryPassword = $( '#encryptionRecoveryPassword' ).val(); var confirmPassword = $( '#repeatEncryptionRecoveryPassword' ).val(); OC.msg.startSaving('#encryptionSetRecoveryKey .msg'); $.post( - OC.generateUrl('/apps/encryption/ajax/adminRecovery') - , { adminEnableRecovery: recoveryStatus, recoveryPassword: recoveryPassword, confirmPassword: confirmPassword } - , function( result ) { + OC.generateUrl('/apps/encryption/ajax/adminRecovery'), + { adminEnableRecovery: recoveryStatus, + recoveryPassword: recoveryPassword, + confirmPassword: confirmPassword }, + function( result ) { OC.msg.finishedSaving('#encryptionSetRecoveryKey .msg', result); if (result.status === "error") { - $('input:radio[name="adminEnableRecovery"][value="'+oldStatus.toString()+'"]').attr("checked", "true"); + $('input:radio[name="adminEnableRecovery"][value="'+oldStatus.toString()+'"]') + .attr("checked", "true"); } else { if (recoveryStatus === "0") { $('p[name="changeRecoveryPasswordBlock"]').addClass("hidden"); @@ -44,9 +47,9 @@ $(document).ready(function(){ var confirmNewPassword = $('#repeatedNewEncryptionRecoveryPassword').val(); OC.msg.startSaving('#encryptionChangeRecoveryKey .msg'); $.post( - OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword') - , { oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword } - , function( data ) { + OC.generateUrl('/apps/encryption/ajax/changeRecoveryPassword'), + { oldPassword: oldRecoveryPassword, newPassword: newRecoveryPassword, confirmPassword: confirmNewPassword }, + function( data ) { OC.msg.finishedSaving('#encryptionChangeRecoveryKey .msg', data); } ); |