don't let the the user disable encryption once it was activated

This commit is contained in:
Bjoern Schiessle 2015-05-04 13:00:17 +02:00
parent 7376ea9b26
commit 6dc3682cc2
3 changed files with 10 additions and 1 deletions

View file

@ -494,3 +494,7 @@ doesnotexist:-o-prefocus, .strengthify-wrapper {
#encryptionModules { #encryptionModules {
padding: 10px; padding: 10px;
} }
#warning {
color: red;
}

View file

@ -55,6 +55,7 @@ $(document).ready(function(){
}); });
$('#encryptionEnabled').change(function() { $('#encryptionEnabled').change(function() {
$('#encryptionAPI div#EncryptionWarning').toggleClass('hidden');
$('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden'); $('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden');
}); });

View file

@ -321,11 +321,15 @@ if ($_['cronErrors']) {
<p id="enable"> <p id="enable">
<input type="checkbox" name="encryption_enabled" <input type="checkbox" name="encryption_enabled"
id="encryptionEnabled" id="encryptionEnabled"
value="1" <?php if ($_['encryptionEnabled']) print_unescaped('checked="checked"'); ?> /> value="1" <?php if ($_['encryptionEnabled']) print_unescaped('checked="checked" disabled="disabled"'); ?> />
<label <label
for="encryptionEnabled"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/> for="encryptionEnabled"><?php p($l->t('Enable server-side encryption')); ?> <span id="startmigration_msg" class="msg"></span> </label><br/>
</p> </p>
<div id="EncryptionWarning" class="warning hidden">
<?php p($l->t('Once encryption is enabled there is no way to disable it again. This is your last chance to disable it again.')) ?>
</div>
<div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) p('hidden'); ?>"> <div id="EncryptionSettingsArea" class="<?php if (!$_['encryptionEnabled']) p('hidden'); ?>">
<div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) p('hidden'); ?>"> <div id='selectEncryptionModules' class="<?php if (!$_['encryptionReady']) p('hidden'); ?>">
<?php <?php