2014-09-29 12:29:13 +02:00
|
|
|
<?php
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
// {{{ICINGA_LICENSE_HEADER}}}
|
|
|
|
|
2014-11-10 16:31:40 +01:00
|
|
|
namespace Icinga\Module\Setup\Form;
|
2014-09-29 12:29:13 +02:00
|
|
|
|
|
|
|
use Icinga\Web\Form;
|
2014-09-29 15:46:30 +02:00
|
|
|
use Icinga\Web\Form\Element\Note;
|
2014-09-29 12:29:13 +02:00
|
|
|
use Icinga\Form\Config\General\LoggingConfigForm;
|
|
|
|
use Icinga\Form\Config\General\ApplicationConfigForm;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Wizard page to define the application and logging configuration
|
|
|
|
*/
|
|
|
|
class GeneralConfigPage extends Form
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Initialize this page
|
|
|
|
*/
|
|
|
|
public function init()
|
|
|
|
{
|
2014-10-06 13:52:32 +02:00
|
|
|
$this->setName('setup_general_config');
|
2014-09-29 12:29:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @see Form::createElements()
|
|
|
|
*/
|
|
|
|
public function createElements(array $formData)
|
|
|
|
{
|
2014-09-29 15:28:36 +02:00
|
|
|
$this->addElement(
|
2014-09-29 15:46:30 +02:00
|
|
|
new Note(
|
|
|
|
'description',
|
|
|
|
array(
|
|
|
|
'value' => t(
|
|
|
|
'Now please adjust all application and logging related configuration options to fit your needs.'
|
|
|
|
)
|
2014-09-29 15:28:36 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2014-10-21 17:02:21 +02:00
|
|
|
// TODO: This is splitted as not all elements are required (as of d201cff)
|
2014-09-29 12:29:13 +02:00
|
|
|
$appForm = new ApplicationConfigForm();
|
2014-10-21 17:02:21 +02:00
|
|
|
$appForm->createElements($formData);
|
|
|
|
$this->addElement($appForm->getElement('global_filemode'));
|
2014-09-29 12:29:13 +02:00
|
|
|
|
|
|
|
$loggingForm = new LoggingConfigForm();
|
|
|
|
$this->addElements($loggingForm->createElements($formData)->getElements());
|
|
|
|
}
|
|
|
|
}
|