diff --git a/View/Helper/BoostCakeHtmlHelper.php b/View/Helper/BoostCakeHtmlHelper.php index 2965a51..1cf25f8 100644 --- a/View/Helper/BoostCakeHtmlHelper.php +++ b/View/Helper/BoostCakeHtmlHelper.php @@ -25,6 +25,12 @@ public function useTag($tag) { if ($tag === 'radio') { $regex = '/()/'; if (preg_match($regex, $html, $match)) { + + if((strpos($class, 'btn') !== false) && ($args[3]['checked'] == 'checked')) + { + $class .= ' active'; + } + $html = $match[1] . ' class="' . $class . '"' . $match[2] . preg_replace($regex, ' ', $html); } } @@ -71,4 +77,4 @@ public function image($path, $options = array()) { return parent::image($path, $options); } -} \ No newline at end of file +}