diff --git a/application/forms/IcingaTemplateChoiceForm.php b/application/forms/IcingaTemplateChoiceForm.php index 27af5d222..8cde17dc8 100644 --- a/application/forms/IcingaTemplateChoiceForm.php +++ b/application/forms/IcingaTemplateChoiceForm.php @@ -2,6 +2,7 @@ namespace Icinga\Module\Director\Forms; +use Icinga\Module\Director\Data\Db\DbObject; use Icinga\Module\Director\Db; use Icinga\Module\Director\Objects\IcingaTemplateChoice; use Icinga\Module\Director\Web\Form\DirectorObjectForm; @@ -103,6 +104,13 @@ public function setup() $this->setButtons(); } + protected function setDefaultsFromObject(DbObject $object) + { + parent::setDefaultsFromObject($object); + + $this->getElement('required_template')->setValue($object->get('required_template')); + } + protected function fetchUnboundTemplates() { /** @var IcingaTemplateChoice $object */