Skip to content

Commit 6b4cd30

Browse files
authored
Merge pull request #158 from Icinga/fix/config-forms
Fix config forms
2 parents e5a62f7 + e98b002 commit 6b4cd30

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

application/controllers/ConfigController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ function (NotificationsConfigForm $form) use ($sourceForm) {
119119

120120
if (
121121
$source === null
122+
|| ! isset($kconfig[KConfig::NOTIFICATIONS_PASSWORD])
122123
// Must be kept in sync with SourceForm.
123124
|| password_hash(
124125
$kconfig[KConfig::NOTIFICATIONS_PASSWORD]->value,

application/forms/PrometheusConfigForm.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ protected function assemble(): void
100100
KConfig::transformKeyForForm(KConfig::PROMETHEUS_URL),
101101
[
102102
'label' => $this->translate('URL'),
103-
'required' => true,
104103
'value' => $kconfig[KConfig::PROMETHEUS_URL]->value ?? null,
105104
'disabled' => $kconfig[KConfig::PROMETHEUS_URL]->locked ?? false,
106105
'ignore' => $kconfig[KConfig::PROMETHEUS_URL]->locked ?? false,
@@ -114,7 +113,7 @@ protected function assemble(): void
114113
'label' => $this->translate('Insecure'),
115114
'checkedValue' => 'true',
116115
'uncheckedValue' => 'false',
117-
'value' => $kconfig[KConfig::PROMETHEUS_INSECURE]?->value === 'true',
116+
'value' => $kconfig[KConfig::PROMETHEUS_INSECURE]->value ?? null === 'true',
118117
'disabled' => $kconfig[KConfig::PROMETHEUS_INSECURE]->locked ?? false,
119118
'ignore' => $kconfig[KConfig::PROMETHEUS_INSECURE]->locked ?? false,
120119
]

0 commit comments

Comments
 (0)