SettingsForm: show stored values

fixes #13042
This commit is contained in:
Thomas Gelf 2016-11-03 22:04:06 +01:00
parent 1afe452d29
commit f2b178ecec

View file

@ -54,12 +54,9 @@ class SettingsForm extends QuickForm
'description' => $this->translate(
'Whether all configured Jobs should be disabled'
),
'value' => $settings->getStoredValue('disable_all_jobs')
));
$this->getElement('disable_all_jobs')->setValue(
$settings->getStoredValue('disable_all_jobs')
);
$this->addElement('select', 'enable_audit_log', array(
'label' => $this->translate('Enable audit log'),
'multiOptions' => $this->eventuallyConfiguredEnum(
@ -77,12 +74,9 @@ class SettingsForm extends QuickForm
. ' enabling this please make sure that you configured Icinga'
. ' Web 2 to log at least at "informational" level.'
),
'value' => $settings->getStoredValue('enable_audit_log')
));
$this->getElement('disable_all_jobs')->setValue(
$settings->getStoredValue('disable_all_jobs')
);
$this->addElement('select', 'config_format', array(
'label' => $this->translate('Configuration format'),
'multiOptions' => $this->eventuallyConfiguredEnum(
@ -99,12 +93,9 @@ class SettingsForm extends QuickForm
. ' unsupported. There are no plans to make Director a first-'
. 'class configuration backends for Icinga 1.x'
),
'value' => $settings->getStoredValue('config_format')
));
$this->getElement('config_format')->setValue(
$settings->getStoredValue('config_format')
);
$this->setSubmitLabel($this->translate('Store'));
}