Skip to content

Commit 5f4ad0f

Browse files
committed
IcingaAddServiceForm: Check if service templates exist to add services
1 parent b18cf4f commit 5f4ad0f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

application/forms/IcingaAddServiceForm.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ public function setup()
3030
);
3131
}
3232

33-
$this->addSingleImportElement();
33+
$this->addSingleImportElement(true);
34+
35+
if (empty($this->enumServiceTemplates())) {
36+
$this->setSubmitLabel(false);
37+
38+
return;
39+
}
3440

3541
if (! ($imports = $this->getSentOrObjectValue('imports'))) {
3642
$this->setSubmitLabel($this->translate('Next'));

0 commit comments

Comments
 (0)