Created
June 27, 2013 08:20
Revisions
-
stealthinu created this gist
Jun 27, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ diff --git a/View/Helper/BootstrapFormHelper.php b/View/Helper/BootstrapFormHelper.php index 89f9814..714709f 100644 --- a/View/Helper/BootstrapFormHelper.php +++ b/View/Helper/BootstrapFormHelper.php @@ -114,10 +114,19 @@ class BootstrapFormHelper extends FormHelper { } public function radio($fieldName, $radioOptions = array(), $options = array()) { + $inlineFlag = false; + if (isset($options['inline']) and true == $options['inline']) { + $inlineFlag = true; + unset($options['inline']); + } $options['legend'] = false; $options['separator'] = "\n"; $out = parent::radio($fieldName, $radioOptions, $options); - $out = $this->_restructureLabel($out, array('class' => 'radio')); + if ($inlineFlag) { + $out = $this->_restructureLabel($out, array('class' => 'radio inline')); + } else { + $out = $this->_restructureLabel($out, array('class' => 'radio')); + } return $out; }