From 65dd3f9a5b971e8f0cbf5493f3297dda279bde64 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 27 Aug 2014 10:10:55 +0200 Subject: [PATCH] Make the form in view scripts accessible using $form instead of $element refs #5525 --- library/Icinga/Web/Form.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 303abc711..b3ae5af46 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -479,7 +479,10 @@ class Form extends Zend_Form $decorators = $this->getDecorators(); if (empty($decorators)) { if ($this->viewScript) { - $this->addDecorator('ViewScript', array('viewScript' => $this->viewScript)); + $this->addDecorator('ViewScript', array( + 'viewScript' => $this->viewScript, + 'form' => $this + )); } else { $this->addDecorator('FormElements') //->addDecorator('HtmlTag', array('tag' => 'dl', 'class' => 'zend_form'))