mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Wrap selection group input in label
This commit is contained in:
parent
5a7c6d4f60
commit
68041f4265
@ -101,17 +101,9 @@ class SelectionGroup extends CompositeField
|
||||
'name' => $this->name,
|
||||
'value' => $item->getValue(),
|
||||
'checked' => $checked,
|
||||
'aria-labelledby' => "title-{$itemID}",
|
||||
)
|
||||
)),
|
||||
"RadioLabel" => DBField::create_field('HTMLFragment', FormField::create_tag(
|
||||
'label',
|
||||
array(
|
||||
'id' => "title-{$itemID}",
|
||||
'for' => $itemID
|
||||
),
|
||||
$item->getTitle()
|
||||
)),
|
||||
"RadioLabel" => $item->getTitle(),
|
||||
"Selected" => $firstSelected,
|
||||
);
|
||||
$newItems[] = $item->customise($extra);
|
||||
|
@ -13,7 +13,7 @@
|
||||
<ul class="SelectionGroup<% if extraClass %> $extraClass<% end_if %>">
|
||||
<% loop $FieldSet %>
|
||||
<li$Selected>
|
||||
{$RadioButton}{$RadioLabel}
|
||||
<label>{$RadioButton} {$RadioLabel}</label>
|
||||
<% if $FieldList %>
|
||||
$FieldHolder
|
||||
<% end_if %>
|
||||
|
Loading…
Reference in New Issue
Block a user