From 764d9e4d77f2fb2fe4b05953aaa85beb74daa91e Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 15 Oct 2015 20:08:40 +0200 Subject: [PATCH] IcingaHostForm: use display groups --- application/forms/IcingaHostForm.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/application/forms/IcingaHostForm.php b/application/forms/IcingaHostForm.php index 507b72bc..8cf7a2d2 100644 --- a/application/forms/IcingaHostForm.php +++ b/application/forms/IcingaHostForm.php @@ -39,17 +39,24 @@ class IcingaHostForm extends DirectorObjectForm )); */ + $elements = array( + 'object_name', + 'display_name', + 'address', + 'address6', + 'imports', + ); + $this->addDisplayGroup($elements, 'object_definition', array( + 'decorators' => array( + 'FormElements', + 'DtDdWrapper', + 'Fieldset', + ), + 'order' => 20, + 'legend' => $this->translate('Host properties') + )); + if ($this->isTemplate()) { - $this->addElement('text', 'address', array( - 'label' => $this->translate('Host address'), - 'description' => $this->translate('Host address. Usually an IPv4 address, but may be any kind of address your check plugin is able to deal with') - )); - - $this->addElement('text', 'address6', array( - 'label' => $this->translate('IPv6 address'), - 'description' => $this->translate('Usually your hosts main IPv6 address') - )); - $this->addCheckExecutionElements(); } else { $this->getElement('imports')->setRequired();