2021-07-19 15:00:09 +02:00
|
|
|
<?php
|
2021-07-30 08:18:30 +02:00
|
|
|
|
2021-07-21 11:18:06 +02:00
|
|
|
$variantFromSeverity = [
|
|
|
|
'critical' => 'danger',
|
|
|
|
'warning' => 'warning',
|
|
|
|
'info' => 'info',
|
|
|
|
];
|
2021-10-12 10:21:12 +02:00
|
|
|
|
|
|
|
$navLinks = [];
|
|
|
|
$tabContents = [];
|
|
|
|
|
|
|
|
foreach ($settingsProvider as $settingTitle => $settingContent) {
|
|
|
|
$navLinks[] = h($settingTitle);
|
|
|
|
$tabContents[] = $this->element('Settings/category', [
|
|
|
|
'settings' => $settingContent,
|
|
|
|
'includeScrollspy' => true,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
array_unshift($navLinks, __('Settings Diagnostic'));
|
|
|
|
$notice = $this->element('Settings/notice', [
|
|
|
|
'variantFromSeverity' => $variantFromSeverity,
|
|
|
|
'notices' => $notices,
|
|
|
|
]);
|
|
|
|
array_unshift($tabContents, $notice);
|
2021-07-19 15:00:09 +02:00
|
|
|
?>
|
2021-07-26 11:16:52 +02:00
|
|
|
|
|
|
|
<script>
|
2021-10-18 13:24:30 +02:00
|
|
|
window.variantFromSeverity = <?= json_encode($variantFromSeverity) ?>;
|
|
|
|
window.settingsFlattened = <?= json_encode($settingsFlattened) ?>;
|
|
|
|
window.saveSettingURL = '/instance/saveSetting'
|
2021-07-26 11:16:52 +02:00
|
|
|
</script>
|
|
|
|
|
2021-07-19 15:00:09 +02:00
|
|
|
<div class="px-5">
|
2021-09-28 10:59:57 +02:00
|
|
|
<div class="mb-3 mt-2">
|
2021-07-26 11:16:52 +02:00
|
|
|
<?=
|
2021-10-18 13:24:30 +02:00
|
|
|
$this->element('Settings/search', [
|
|
|
|
'settingsFlattened' => $settingsFlattened,
|
|
|
|
]);
|
2021-07-26 11:16:52 +02:00
|
|
|
?>
|
2021-07-19 15:00:09 +02:00
|
|
|
</div>
|
2021-10-12 10:21:12 +02:00
|
|
|
<?php
|
2021-10-18 13:24:30 +02:00
|
|
|
$tabsOptions = [
|
|
|
|
'card' => false,
|
|
|
|
'pills' => false,
|
|
|
|
'justify' => 'center',
|
|
|
|
'nav-class' => ['settings-tabs'],
|
|
|
|
'data' => [
|
|
|
|
'navs' => $navLinks,
|
|
|
|
'content' => $tabContents
|
|
|
|
]
|
|
|
|
];
|
|
|
|
echo $this->Bootstrap->tabs($tabsOptions);
|
|
|
|
echo $this->Html->script('settings');
|
2021-10-12 10:21:12 +02:00
|
|
|
?>
|
2021-07-19 15:00:09 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
2021-07-22 16:59:26 +02:00
|
|
|
.input-group-actions {
|
|
|
|
z-index: 5;
|
|
|
|
}
|
2021-10-18 13:24:30 +02:00
|
|
|
|
|
|
|
.form-control[type="number"]~div>a.btn-reset-setting {
|
2021-07-23 14:51:48 +02:00
|
|
|
left: -3em;
|
|
|
|
}
|
2021-10-18 13:24:30 +02:00
|
|
|
|
|
|
|
select.custom-select[multiple][data-setting-name]~span.select2-container {
|
2021-07-30 14:50:40 +02:00
|
|
|
min-width: unset;
|
|
|
|
}
|
2021-10-18 13:24:30 +02:00
|
|
|
|
2021-07-30 14:50:40 +02:00
|
|
|
span.select2-container--open {
|
|
|
|
min-width: unset;
|
|
|
|
}
|
2021-07-19 15:00:09 +02:00
|
|
|
</style>
|