diff --git a/application/forms/IcingaCommandArgumentForm.php b/application/forms/IcingaCommandArgumentForm.php index 8201df02..03cd588b 100644 --- a/application/forms/IcingaCommandArgumentForm.php +++ b/application/forms/IcingaCommandArgumentForm.php @@ -84,7 +84,7 @@ class IcingaCommandArgumentForm extends DirectorObjectForm protected function addCustomVariable($varname) { $a = new \Zend_Form_SubForm(); - $a->addElement('note', 'title', array( + $a->addElement('simpleNote', 'title', array( 'label' => sprintf($this->translate('Custom Variable "%s"'), $varname), )); diff --git a/application/views/helpers/FormSimpleNote.php b/application/views/helpers/FormSimpleNote.php new file mode 100644 index 00000000..69496a74 --- /dev/null +++ b/application/views/helpers/FormSimpleNote.php @@ -0,0 +1,11 @@ +_getInfo($name, $value); + extract($info); // name, value, attribs, options, listsep, disable + return $value; + } +} diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php index 7d66b75b..20595bf7 100644 --- a/library/Director/Web/Form/DirectorObjectForm.php +++ b/library/Director/Web/Form/DirectorObjectForm.php @@ -77,7 +77,7 @@ abstract class DirectorObjectForm extends QuickForm /* // TODO implement when new logic is there - $this->addElement('note', '_newrange_hint', array('label' => 'New range')); + $this->addElement('simpleNote', '_newrange_hint', array('label' => 'New range')); $this->addElement('text', '_newrange_name', array( 'label' => 'Name' )); diff --git a/library/Director/Web/Form/Element/SimpleNote.php b/library/Director/Web/Form/Element/SimpleNote.php new file mode 100644 index 00000000..b26ae7c7 --- /dev/null +++ b/library/Director/Web/Form/Element/SimpleNote.php @@ -0,0 +1,15 @@ +hintCount; - $this->addElement('note', $name, $options); + $this->addElement('simpleNote', $name, $options); $this->getElement($name) ->setValue($html) ->setIgnore(true)