diff options
-rw-r--r-- | apps/encryption/js/settings-personal.js | 6 | ||||
-rw-r--r-- | apps/encryption/templates/settings-admin.php | 4 | ||||
-rw-r--r-- | apps/encryption/templates/settings-personal.php | 2 | ||||
-rw-r--r-- | core/css/apps.css | 6 | ||||
-rw-r--r-- | settings/admin.php | 10 | ||||
-rw-r--r-- | settings/templates/admin.php | 2 |
6 files changed, 21 insertions, 9 deletions
diff --git a/apps/encryption/js/settings-personal.js b/apps/encryption/js/settings-personal.js index 658ba2a86ec..fa94bea6bc5 100644 --- a/apps/encryption/js/settings-personal.js +++ b/apps/encryption/js/settings-personal.js @@ -12,7 +12,7 @@ OC.Encryption = { updatePrivateKeyPassword: function () { var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); - OC.msg.startSaving('#encryption .msg'); + OC.msg.startSaving('#ocDefaultEncryptionModule .msg'); $.post( OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'), { @@ -20,10 +20,10 @@ OC.Encryption = { newPassword: newPrivateKeyPassword } ).done(function (data) { - OC.msg.finishedSuccess('#encryption .msg', data.message); + OC.msg.finishedSuccess('#ocDefaultEncryptionModule .msg', data.message); }) .fail(function (jqXHR) { - OC.msg.finishedError('#encryption .msg', JSON.parse(jqXHR.responseText).message); + OC.msg.finishedError('#ocDefaultEncryptionModule .msg', JSON.parse(jqXHR.responseText).message); }); } }; diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php index b64e75512e7..ac329b27879 100644 --- a/apps/encryption/templates/settings-admin.php +++ b/apps/encryption/templates/settings-admin.php @@ -4,9 +4,7 @@ script('encryption', 'settings-admin'); script('core', 'multiselect'); ?> -<form id="encryption" class="section"> - <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2> - +<form id="ocDefaultEncryptionModule" class="sub-section"> <?php if(!$_["initStatus"]): ?> <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?> <?php else: ?> diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php index 6b8821ca8a8..e0a7fc22eeb 100644 --- a/apps/encryption/templates/settings-personal.php +++ b/apps/encryption/templates/settings-personal.php @@ -4,7 +4,7 @@ script('encryption', 'settings-personal'); script('core', 'multiselect'); ?> -<form id="encryption" class="section"> +<form id="ocDefaultEncryptionModule" class="section"> <h2><?php p($l->t('ownCloud basic encryption module')); ?></h2> <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?> diff --git a/core/css/apps.css b/core/css/apps.css index 9b662cc31af..57133729f15 100644 --- a/core/css/apps.css +++ b/core/css/apps.css @@ -495,6 +495,12 @@ button.loading { .section.hidden { display: none !important; } +.sub-section { + position: relative; + margin-top: 10px; + margin-left: 27px; + margin-bottom: 10px; +} /* no top border for first settings item */ #app-content > .section:first-child { border-top: none; diff --git a/settings/admin.php b/settings/admin.php index e8d9c6530db..5720bd9f99c 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -141,9 +141,10 @@ if ($request->getServerProtocol() !== 'https' || !OC_Util::isAnnotationsWorking $formsAndMore[] = array('anchor' => 'security-warning', 'section-name' => $l->t('Security & setup warnings')); } $formsAndMore[] = array('anchor' => 'shareAPI', 'section-name' => $l->t('Sharing')); +$formsAndMore[] = ['anchor' => 'encryptionAPI', 'section-name' => $l->t('Server-side encryption')]; // Prioritize fileSharingSettings and files_external and move updater to the version -$fileSharingSettings = $filesExternal = $updaterAppPanel = ''; +$fileSharingSettings = $filesExternal = $updaterAppPanel = $ocDefaultEncryptionModulePanel = ''; foreach ($forms as $index => $form) { if (strpos($form, 'id="fileSharingSettings"')) { $fileSharingSettings = $form; @@ -160,6 +161,11 @@ foreach ($forms as $index => $form) { unset($forms[$index]); continue; } + if (strpos($form, 'id="ocDefaultEncryptionModule"')) { + $ocDefaultEncryptionModulePanel = $form; + unset($forms[$index]); + continue; + } } if ($filesExternal) { $formsAndMore[] = array('anchor' => 'files_external', 'section-name' => $l->t('External Storage')); @@ -168,6 +174,7 @@ if ($filesExternal) { $template->assign('fileSharingSettings', $fileSharingSettings); $template->assign('filesExternal', $filesExternal); $template->assign('updaterAppPanel', $updaterAppPanel); +$template->assign('ocDefaultEncryptionModulePanel', $ocDefaultEncryptionModulePanel); $formsMap = array_map(function ($form) { if (preg_match('%(<h2[^>]*>.*?</h2>)%i', $form, $regs)) { @@ -190,7 +197,6 @@ $formsMap = array_map(function ($form) { $formsAndMore = array_merge($formsAndMore, $formsMap); // add bottom hardcoded forms from the template -$formsAndMore[] = ['anchor' => 'encryptionAPI', 'section-name' => $l->t('Server-side encryption')]; $formsAndMore[] = ['anchor' => 'backgroundjobs', 'section-name' => $l->t('Cron')]; $formsAndMore[] = ['anchor' => 'mail_general_settings', 'section-name' => $l->t('Email server')]; $formsAndMore[] = ['anchor' => 'log-section', 'section-name' => $l->t('Log')]; diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 5edf4e2a9c7..6d2796d963f 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -344,6 +344,8 @@ if ($_['cronErrors']) { <label for="<?php p($id) ?>"><?php p($module['displayName']) ?></label> <br/> + + <?php if ($id === 'OC_DEFAULT_MODULE') print_unescaped($_['ocDefaultEncryptionModulePanel']); ?> <?php endforeach; ?> </fieldset> <?php } ?> |