mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-02-03 20:40:15 -05:00
27 lines
753 B
PHP
27 lines
753 B
PHP
<?php
|
|
|
|
namespace Icinga\Module\Icingadb\Forms;
|
|
|
|
use Icinga\Data\ResourceFactory;
|
|
use Icinga\Forms\ConfigForm;
|
|
|
|
class DatabaseConfigForm extends ConfigForm
|
|
{
|
|
public function init()
|
|
{
|
|
$this->setSubmitLabel($this->translate('Save Changes'));
|
|
}
|
|
|
|
public function createElements(array $formData)
|
|
{
|
|
$dbResources = ResourceFactory::getResourceConfigs('db')->keys();
|
|
|
|
$this->addElement('select', 'icingadb_resource', [
|
|
'description' => $this->translate('Database resource'),
|
|
'label' => $this->translate('Database'),
|
|
'multiOptions' => array_combine($dbResources, $dbResources),
|
|
'required' => true,
|
|
'value' => 'icingadb'
|
|
]);
|
|
}
|
|
}
|