Loading src/UnicaenApp/Form/View/Helper/FormControlGroup.php +6 −4 Original line number Diff line number Diff line Loading @@ -140,16 +140,18 @@ class FormControlGroup extends AbstractHelper { if (!$element instanceof Button && !is_a($element, Checkbox::class)) { $class = $element->getAttribute('class'); if (is_a($element, Select::class)){ $element->setAttribute('class', $class . ' form-select'); }else{ $element->setAttribute('class', $class . ' form-control'); } $labelClass = array_key_exists('class', $tmp = (array)$element->getLabelAttributes()) ? $tmp['class'] : ''; $labelAttributes = array_merge($element->getLabelAttributes(), ['class' => $labelClass . ' form-label']); $element->setLabelAttributes($labelAttributes); } if (is_a($element, Select::class)){ $element->setAttribute('class', $element->getAttribute('class') . ' form-select'); } if (is_a($element, Checkbox::class)) { $element->setAttribute('class', $element->getAttribute('class') . ' form-check-input'); Loading Loading
src/UnicaenApp/Form/View/Helper/FormControlGroup.php +6 −4 Original line number Diff line number Diff line Loading @@ -140,16 +140,18 @@ class FormControlGroup extends AbstractHelper { if (!$element instanceof Button && !is_a($element, Checkbox::class)) { $class = $element->getAttribute('class'); if (is_a($element, Select::class)){ $element->setAttribute('class', $class . ' form-select'); }else{ $element->setAttribute('class', $class . ' form-control'); } $labelClass = array_key_exists('class', $tmp = (array)$element->getLabelAttributes()) ? $tmp['class'] : ''; $labelAttributes = array_merge($element->getLabelAttributes(), ['class' => $labelClass . ' form-label']); $element->setLabelAttributes($labelAttributes); } if (is_a($element, Select::class)){ $element->setAttribute('class', $element->getAttribute('class') . ' form-select'); } if (is_a($element, Checkbox::class)) { $element->setAttribute('class', $element->getAttribute('class') . ' form-check-input'); Loading