Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Commit

Permalink
updated checkbox error state: no control-label needed according to bo…
Browse files Browse the repository at this point in the history
…otstrap docs
  • Loading branch information
Maximilian Füsslin committed Apr 27, 2018
1 parent 2ee321c commit 9ae8de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TwbBundle/Form/View/Helper/TwbBundleFormRow.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ protected function renderElement(ElementInterface $oElement, $sLabelPosition = n
if ($oElement->getOption('validation-state') || $oElement->getMessages()) {
if (empty($aLabelAttributes['class'])) {
$aLabelAttributes['class'] = 'control-label';
} elseif (!preg_match('/(\s|^)control-label(\s|$)/', $aLabelAttributes['class'])) {
} elseif (!preg_match('/(\s|^)control-label(\s|$)/', $aLabelAttributes['class']) && $sElementType !== 'checkbox') {
$aLabelAttributes['class'] = trim($aLabelAttributes['class'] . ' control-label');
}
}
Expand Down

0 comments on commit 9ae8de2

Please sign in to comment.