Skip to content

Commit 22d87a0

Browse files
authored
[5.2] Add custom css (#43392)
* add custom css fix 41205 * cs fix * Update libraries/src/HTML/Helpers/Select.php * Update libraries/src/HTML/Helpers/Select.php * pin mysql to 8.3.0 * sign * revert drone.yml change
1 parent aa3ab7c commit 22d87a0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libraries/src/HTML/Helpers/Select.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,14 @@ public static function radiolist(
631631
$idtag = false,
632632
$translate = false
633633
) {
634+
$class = '';
635+
634636
if (\is_array($attribs)) {
637+
if (\array_key_exists('class', $attribs)) {
638+
$class = ' ' . $attribs['class'];
639+
unset($attribs['class']);
640+
}
641+
635642
$attribs = ArrayHelper::toString($attribs);
636643
}
637644

@@ -662,7 +669,7 @@ public static function radiolist(
662669
$extra .= ((string) $k === (string) $selected ? ' checked="checked" ' : '');
663670
}
664671

665-
$html .= '<input type="radio" class="form-check-input" name="' . $name . '" id="' . $id . '" value="' . $k . '" '
672+
$html .= '<input type="radio" class="form-check-input' . $class . '" name="' . $name . '" id="' . $id . '" value="' . $k . '" '
666673
. $extra . $attribs . '>';
667674
$html .= '<label for="' . $id . '" class="form-check-label" id="' . $id . '-lbl">' . $t . '</label>';
668675
$html .= '</div>';

0 commit comments

Comments
 (0)