diff --git a/CHANGELOG.md b/CHANGELOG.md index 111c4a37..28746bd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ Thank you all Antonio Ramirez. ## YiiBooster latest development alpha -- +- **(fix)** fix TbActiveForm/checkboxListGroup, radioButtonListGroup to work with Bootstrap 3.2.0 #935 ## YiiBooster version 4.1.0 - **(enh)** upgarde to Bootstrap 3.2.0 - #882 diff --git a/src/widgets/TbActiveForm.php b/src/widgets/TbActiveForm.php index a30c4036..1be61999 100644 --- a/src/widgets/TbActiveForm.php +++ b/src/widgets/TbActiveForm.php @@ -691,14 +691,17 @@ public function checkboxListGroup($model, $attribute, $options = array()) { // if(!isset($options['widgetOptions']['data'])) // throw new CException('$options["widgetOptions"]["data"] must exist'); - if (!isset($widgetOptions['labelOptions']['class'])) - $widgetOptions['labelOptions']['class'] = 'checkbox'; + // if (!isset($widgetOptions['labelOptions']['class'])) + // $widgetOptions['labelOptions']['class'] = 'checkbox'; - if(isset($options['inline']) && $options['inline']) + if(isset($options['inline']) && $options['inline']) { $widgetOptions['labelOptions']['class'] = 'checkbox-inline'; + if (!isset($widgetOptions['template'])) + $widgetOptions['template'] = '{beginLabel}{input}{labelTitle}{endLabel}'; + } if (!isset($widgetOptions['template'])) - $widgetOptions['template'] = '{beginLabel}{input}{labelTitle}{endLabel}'; + $widgetOptions['template'] = '