Make the form in view scripts accessible using $form instead of $element

refs #5525
This commit is contained in:
Johannes Meyer 2014-08-27 10:10:55 +02:00
parent 98b2bce15e
commit 65dd3f9a5b
1 changed files with 4 additions and 1 deletions

View File

@ -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'))