2014-09-29 12:29:13 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-09-29 12:29:13 +02:00
|
|
|
|
2014-11-14 11:01:16 +01:00
|
|
|
namespace Icinga\Module\Setup\Forms;
|
2014-09-29 12:29:13 +02:00
|
|
|
|
|
|
|
use Icinga\Web\Form;
|
2014-11-14 10:57:14 +01:00
|
|
|
use Icinga\Forms\Config\General\LoggingConfigForm;
|
2014-09-29 12:29:13 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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-11-11 15:27:14 +01:00
|
|
|
$this->addElement(
|
2014-11-14 10:15:11 +01:00
|
|
|
'note',
|
|
|
|
'title',
|
|
|
|
array(
|
2015-01-19 11:07:39 +01:00
|
|
|
'value' => $this->translate('Application Configuration', 'setup.page.title'),
|
2014-11-14 10:15:11 +01:00
|
|
|
'decorators' => array(
|
|
|
|
'ViewHelper',
|
|
|
|
array('HtmlTag', array('tag' => 'h2'))
|
2014-11-11 15:27:14 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
2014-09-29 15:28:36 +02:00
|
|
|
$this->addElement(
|
2014-11-14 10:15:11 +01:00
|
|
|
'note',
|
|
|
|
'description',
|
|
|
|
array(
|
2015-01-19 11:07:39 +01:00
|
|
|
'value' => $this->translate(
|
2014-11-14 10:15:11 +01:00
|
|
|
'Now please adjust all application and logging related configuration options to fit your needs.'
|
2014-09-29 15:28:36 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2014-09-29 12:29:13 +02:00
|
|
|
$loggingForm = new LoggingConfigForm();
|
|
|
|
$this->addElements($loggingForm->createElements($formData)->getElements());
|
|
|
|
}
|
|
|
|
}
|