mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9427 from ramono/role-option
Add "option" to list elements that belong to "listbox"
This commit is contained in:
commit
8a64101621
@ -90,6 +90,7 @@ class CheckboxSetField extends MultiSelectField
|
||||
$options->push(new ArrayData(array(
|
||||
'ID' => $itemID,
|
||||
'Class' => $extraClass,
|
||||
'Role' => 'option',
|
||||
'Name' => "{$this->name}[{$itemValue}]",
|
||||
'Value' => $itemValue,
|
||||
'Title' => $title,
|
||||
|
@ -72,6 +72,7 @@ class OptionsetField extends SingleSelectField
|
||||
return new ArrayData(array(
|
||||
'ID' => $this->getOptionID($value),
|
||||
'Class' => $this->getOptionClass($value, $odd),
|
||||
'Role' => 'option',
|
||||
'Name' => $this->getOptionName(),
|
||||
'Value' => $value,
|
||||
'Title' => $title,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<ul $AttributesHTML>
|
||||
<% if $Options.Count %>
|
||||
<% loop $Options %>
|
||||
<li class="$Class">
|
||||
<li class="$Class" role="$Role">
|
||||
<input id="$ID" class="checkbox" name="$Name" type="checkbox" value="$Value.ATT"<% if $isChecked %> checked="checked"<% end_if %><% if $isDisabled %> disabled="disabled"<% end_if %> />
|
||||
<label for="$ID">$Title</label>
|
||||
</li>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<ul $AttributesHTML>
|
||||
<% loop $Options %>
|
||||
<li class="$Class">
|
||||
<li class="$Class" role="$Role">
|
||||
<input id="$ID" class="radio" name="$Name" type="radio" value="$Value"<% if $isChecked %> checked<% end_if %><% if $isDisabled %> disabled<% end_if %> <% if $Up.Required %>required<% end_if %> />
|
||||
<label for="$ID">$Title</label>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user