Commit bda8b0fd authored by Steven Wittens's avatar Steven Wittens
Browse files

#40871: Allow class on checkboxes/radios group container.

parent f865087d
......@@ -996,7 +996,11 @@ function theme_radio($element) {
* A themed HTML string representing the radio button set.
*/
function theme_radios($element) {
$element['#children'] = '<div class="form-radios">'. $element['#children'] .'</div>';
$class = 'form-radios';
if (isset($element['#attributes']['class'])) {
$class .= ' '. $element['#attributes']['class'];
}
$element['#children'] = '<div class="'. $class .'">'. $element['#children'] .'</div>';
if ($element['#title'] || $element['#description']) {
unset($element['#id']);
return theme('form_element', $element, $element['#children']);
......@@ -1227,7 +1231,11 @@ function theme_checkbox($element) {
* A themed HTML string representing the checkbox set.
*/
function theme_checkboxes($element) {
$element['#children'] = '<div class="form-checkboxes">'. $element['#children'] .'</div>';
$class = 'form-checkboxes';
if (isset($element['#attributes']['class'])) {
$class .= ' '. $element['#attributes']['class'];
}
$element['#children'] = '<div class="'. $class .'">'. $element['#children'] .'</div>';
if ($element['#title'] || $element['#description']) {
unset($element['#id']);
return theme('form_element', $element, $element['#children']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment