Form: Fix that form titles are missing

The description may not be set at the time
loadDefaultDecorators() is called.
This commit is contained in:
Johannes Meyer 2015-08-21 14:19:51 +02:00
parent 2d9d3a0788
commit d31b60102e

View File

@ -1206,9 +1206,10 @@ class Form extends Zend_Form
'form' => $this
));
} else {
if ($this->getDescription() !== null) {
$this->addDecorator('Description', array('tag' => 'h1', 'escape' => !$this->getUseFormAutosubmit()))
->addDecorator(
$this->addDecorator('Description', array('tag' => 'h1'));
if ($this->getUseFormAutosubmit()) {
$this->getDecorator('Description')->setEscape(false);
$this->addDecorator(
'HtmlTag',
array(
'tag' => 'div',