Skip to content

Commit

Permalink
Do not unpack classes, and always include default form decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Jan 21, 2020
1 parent 9c322d2 commit 77b71f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Decorators/DefaultFormDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function _prepareForProduce(): HtmlElement
$formAttr = $form->getAttributes();
unset($formAttr['class']);
$this->addAttributes($formAttr, true);
$this->addClass(...$form->getClasses());
$this->addClass($form->getClasses());

$action = $form->getAction();
if($action)
Expand All @@ -48,6 +48,6 @@ public function setForm(Form $form): FormDecorator

protected function _getTemplatedPhtmlClassList()
{
return [get_class($this->getForm()), $this->_getTemplatedPhtmlClass()];
return array_unique([get_class($this->getForm()), $this->_getTemplatedPhtmlClass(), self::class]);
}
}

0 comments on commit 77b71f8

Please sign in to comment.