Skip to content

Commit 05aeb0e

Browse files
authored
[4.0] Fix Custom Classes for Radio Fields (#33503)
Reverted $divClass back to $class for styling the outer div
1 parent ada9e59 commit 05aeb0e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

layouts/joomla/form/field/radio/buttons.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@
4545
$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
4646
$isBtnGroup = strpos(trim($class), 'btn-group') !== false;
4747
$isBtnYesNo = strpos(trim($class), 'btn-group-yesno') !== false;
48-
$divClass = $isBtnGroup ? 'btn-group' : '';
4948
$classToggle = $isBtnGroup ? 'btn-check' : 'form-check-input';
5049
$btnClass = $isBtnGroup ? 'btn btn-outline-secondary' : 'form-check-label';
5150
$blockStart = $isBtnGroup ? '' : '<div class="form-check">';
5251
$blockEnd = $isBtnGroup ? '' : '</div>';
5352

5453
// Add the attributes of the fieldset in an array
5554
$attribs = ['class="' . trim(
56-
$divClass . ' radio' . ($readonly || $disabled ? ' disabled' : '') . ($readonly ? ' readonly' : '')
55+
$class . ' radio' . ($readonly || $disabled ? ' disabled' : '') . ($readonly ? ' readonly' : '')
5756
) . '"',];
5857

5958
if (!empty($disabled))

0 commit comments

Comments
 (0)