Skip to content

Commit c60bad3

Browse files
committed
Add class to radio option
Adding class to the radio option, so now it can accept "inline" and position radio buttons next to each other.
1 parent d5c19ab commit c60bad3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

View/Helper/BoostCakeHtmlHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ public function useTag($tag) {
1919
if ($tag === 'radio') {
2020
$regex = '/(<label)(.*?>)/';
2121
if (preg_match($regex, $html, $match)) {
22-
$html = $match[1] . ' class="radio"' . $match[2] . preg_replace($regex, ' ', $html);
22+
$html = $match[1] . ' class="radio'.(isset($args[3]['class']) ? ' '.$args[3]['class'] : '').'"' . $match[2] . preg_replace($regex, ' ', $html);
2323
}
2424
}
2525

2626
return $html;
2727
}
2828

29-
}
29+
}

0 commit comments

Comments
 (0)