QuickForm: preserve existing classes

This commit is contained in:
Thomas Gelf 2020-12-01 05:51:06 +01:00
parent bb2401017e
commit 1e8adb8586
1 changed files with 6 additions and 1 deletions

View File

@ -91,7 +91,12 @@ abstract class QuickForm extends QuickBaseForm
protected function setPreferredDecorators()
{
$this->setAttrib('class', 'autofocus');
$current = $this->getAttrib('class');
if ($current) {
$this->setAttrib('class', "$current autofocus");
} else {
$this->setAttrib('class', 'autofocus');
}
$this->setDecorators(
array(
'Description',