Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Add custom css #43392

Merged
merged 14 commits into from
Jun 3, 2024
10 changes: 9 additions & 1 deletion libraries/src/HTML/Helpers/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,15 @@ public static function radiolist(
$idtag = false,
$translate = false
) {
$class = '';

if (\is_array($attribs)) {

rdeutz marked this conversation as resolved.
Show resolved Hide resolved
if (array_key_exists('class', $attribs)) {
richard67 marked this conversation as resolved.
Show resolved Hide resolved
$class = ' ' . $attribs['class'];
unset($attribs['class']);
}

$attribs = ArrayHelper::toString($attribs);
}

Expand Down Expand Up @@ -662,7 +670,7 @@ public static function radiolist(
$extra .= ((string) $k === (string) $selected ? ' checked="checked" ' : '');
}

$html .= '<input type="radio" class="form-check-input" name="' . $name . '" id="' . $id . '" value="' . $k . '" '
$html .= '<input type="radio" class="form-check-input' . $class .'" name="' . $name . '" id="' . $id . '" value="' . $k . '" '
rdeutz marked this conversation as resolved.
Show resolved Hide resolved
. $extra . $attribs . '>';
$html .= '<label for="' . $id . '" class="form-check-label" id="' . $id . '-lbl">' . $t . '</label>';
$html .= '</div>';
Expand Down