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

Commit

Permalink
Merge pull request #202 from koseduhemak/fix-checkbox-error-state
Browse files Browse the repository at this point in the history
Fixed bug regarding error validation state of checkboxes
  • Loading branch information
neilime committed Apr 27, 2018
2 parents 2ee321c + 9ae8de2 commit 99aabb4
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 99aabb4

Please sign in to comment.