diff --git a/application/forms/IcingaServiceFieldForm.php b/application/forms/IcingaServiceFieldForm.php new file mode 100644 index 00000000..49c506a9 --- /dev/null +++ b/application/forms/IcingaServiceFieldForm.php @@ -0,0 +1,29 @@ +addElement('select', 'service_id', array( + 'label' => 'Service Tpl', + 'description' => 'Service Template', + 'multiOptions' => $this->optionalEnum($this->getDb()->enumServiceTemplates()) + )); + + $this->addElement('select', 'datafield_id', array( + 'label' => 'Field', + 'description' => 'Field to assign', + 'multiOptions' => $this->optionalEnum($this->getDb()->enumDatafields()) + )); + + $this->optionalBoolean( + 'is_required', + $this->translate('Required'), + $this->translate('Whether this filed is required or not.') + ); + } +} diff --git a/library/Director/Objects/IcingaServiceField.php b/library/Director/Objects/IcingaServiceField.php new file mode 100644 index 00000000..af55dc46 --- /dev/null +++ b/library/Director/Objects/IcingaServiceField.php @@ -0,0 +1,18 @@ + null, + 'datafield_id' => null, + 'is_required' => null + ); +}