Skip to content

Commit

Permalink
Ensure "inline" option is detected for checkbox if not explicitly set.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Feb 10, 2016
1 parent 7c0415d commit 8b52d5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/View/Helper/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ public function input($fieldName, array $options = [])

switch ($options['type']) {
case 'checkbox':
if (!isset($options['inline'])) {
$options['inline'] = $this->checkClasses($options['type'] . '-inline', (array)$options['label']);
}

if ($options['inline']) {
$options['label'] = $this->injectClasses($options['type'] . '-inline', (array)$options['label']);
} else {
$options['inline'] = $this->checkClasses($options['type'] . '-inline', (array)$options['label']);
}
break;
case 'radio':
Expand Down

0 comments on commit 8b52d5e

Please sign in to comment.