aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2015-05-05 18:53:01 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2015-05-05 18:53:01 +0200
commit952a90f2e3ab60252b125b3e68193cc4995c0c54 (patch)
treec1c47eac13f5d03190fb57c8eaae4426e0b8ae9f /settings/js
parent67836995011c2506e67e49e2e1857b0003f643fc (diff)
parenta1b944464370da51a9fc952250c3eb597bab30ad (diff)
downloadnextcloud-server-952a90f2e3ab60252b125b3e68193cc4995c0c54.tar.gz
nextcloud-server-952a90f2e3ab60252b125b3e68193cc4995c0c54.zip
Merge pull request #16037 from owncloud/enc_dont_disable_encryption
don't let the the user disable encryption once it was activated
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/admin.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 9cdb7f5b0f1..8f705b9048d 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -54,20 +54,15 @@ $(document).ready(function(){
$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked);
});
- $('#encryptionEnabled').change(function() {
- $('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden');
+ $('#enableEncryption').change(function() {
+ $('#encryptionAPI div#EncryptionWarning').toggleClass('hidden');
});
- $('#encryptionAPI input').change(function() {
- var value = $(this).val();
- if ($(this).attr('type') === 'checkbox') {
- if (this.checked) {
- value = 'yes';
- } else {
- value = 'no';
- }
- }
- OC.AppConfig.setValue('core', $(this).attr('name'), value);
+ $('#reallyEnableEncryption').click(function() {
+ $('#encryptionAPI div#EncryptionWarning').toggleClass('hidden');
+ $('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden');
+ OC.AppConfig.setValue('core', 'encryption_enabled', 'yes');
+ $('#enableEncryption').attr('disabled', 'disabled');
});
$('#startmigration').click(function(event){