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