Merge branch 'bugfix/rebuild-form-builder-5525' into bugfix/commands-6593

This commit is contained in:
Eric Lippmann 2014-09-01 14:50:32 +02:00
commit 30965c247b
1 changed files with 10 additions and 2 deletions

View File

@ -370,7 +370,15 @@ class Form extends Zend_Form
if ($el->getAttrib('autosubmit')) {
// Need to add this decorator first or it interferes with the other's two HTML otherwise
$el->addDecorator(new NoScriptApply()); // Non-JS environments
$el->setAttrib('class', 'autosubmit'); // JS environments
$class = $el->getAttrib('class');
if (is_array($class)) {
$class[] = 'autosubmit';
} elseif ($class === null) {
$class = 'autosubmit';
} else {
$class .= ' autosubmit';
}
$el->setAttrib('class', $class); // JS environments
unset($el->autosubmit);
}
@ -577,8 +585,8 @@ class Form extends Zend_Form
if (! $name) {
$name = get_class($this);
$this->setName($name);
$name = parent::getName();
}
return $name;
}