Cleanup preferences, add them to the menu
This commit is contained in:
parent
9963a21236
commit
13f827a0ef
|
@ -1,15 +1,18 @@
|
||||||
[Dashboard]
|
[Dashboard]
|
||||||
title = "Dashboard"
|
title = "Dashboard"
|
||||||
url = "dashboard"
|
url = "dashboard"
|
||||||
icon = "img/icons/dashboard.png"
|
icon = "img/icons/dashboard.png"
|
||||||
priority = 10
|
priority = 10
|
||||||
|
|
||||||
[System]
|
[System]
|
||||||
icon = img/icons/configuration.png
|
icon = img/icons/configuration.png
|
||||||
priority = 200
|
priority = 200
|
||||||
|
|
||||||
[System.Configuration]
|
[System.Configuration]
|
||||||
title = "Configuration"
|
title = "Configuration"
|
||||||
url = "config/index"
|
url = "config"
|
||||||
|
|
||||||
|
[System.Preferences]
|
||||||
|
title = "Preferences"
|
||||||
|
url = "preference"
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,8 @@ class PreferenceController extends BasePreferenceController
|
||||||
public static function createProvidedTabs()
|
public static function createProvidedTabs()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'preference' => new Tab(
|
'general' => new Tab(
|
||||||
array(
|
array(
|
||||||
'name' => 'general',
|
|
||||||
'title' => 'General settings',
|
'title' => 'General settings',
|
||||||
'url' => Url::fromPath('/preference')
|
'url' => Url::fromPath('/preference')
|
||||||
)
|
)
|
||||||
|
@ -65,6 +64,7 @@ class PreferenceController extends BasePreferenceController
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$form = new GeneralForm();
|
$form = new GeneralForm();
|
||||||
|
$this->getTabs()->activate('general');
|
||||||
$form->setConfiguration(IcingaConfig::app())
|
$form->setConfiguration(IcingaConfig::app())
|
||||||
->setRequest($this->getRequest());
|
->setRequest($this->getRequest());
|
||||||
if ($form->isSubmittedAndValid()) {
|
if ($form->isSubmittedAndValid()) {
|
||||||
|
|
|
@ -256,7 +256,7 @@ class GeneralForm extends Form
|
||||||
$this->addTimezoneSelection($global);
|
$this->addTimezoneSelection($global);
|
||||||
$this->addDateFormatSettings($global);
|
$this->addDateFormatSettings($global);
|
||||||
|
|
||||||
$this->setSubmitLabel('{{SAVE_ICON}} Save Changes');
|
$this->setSubmitLabel('Save Changes');
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'checkbox',
|
'checkbox',
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
|
<div class="controls">
|
||||||
<?= $this->tabs->render($this); ?>
|
<?= $this->tabs->render($this); ?>
|
||||||
|
|
||||||
<?php if (isset($this->successMessage)) : ?>
|
|
||||||
<div class="alert alert-success">
|
|
||||||
<h4>{{SUCCESS_ICON}} <?= $this->successMessage ?></h4>
|
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if (isset($this->exceptionMessage)): ?>
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
<h4>Could not update preferences due to an internal exception (<?= $this->exceptionMessage ?>)</h4>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
<?= $this->form ?>
|
<?= $this->form ?>
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
[Dashboard]
|
[Dashboard]
|
||||||
title = "Dashboard"
|
title = "Dashboard"
|
||||||
url = "dashboard"
|
url = "dashboard"
|
||||||
icon = "img/icons/dashboard.png"
|
icon = "img/icons/dashboard.png"
|
||||||
priority = 10
|
priority = 10
|
||||||
|
|
||||||
[System]
|
[System]
|
||||||
icon = img/icons/configuration.png
|
icon = img/icons/configuration.png
|
||||||
priority = 200
|
priority = 200
|
||||||
|
|
||||||
[System.Configuration]
|
[System.Configuration]
|
||||||
title = "Configuration"
|
title = "Configuration"
|
||||||
url = "config/index"
|
url = "config"
|
||||||
|
|
||||||
|
[System.Preferences]
|
||||||
|
title = "Preferences"
|
||||||
|
url = "preference"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue