silverstripe-framework/templates/Includes/GroupedDropdownFieldOption.ss
Damian Mooyman bdb1a95758 API Cleanup and refactor of select fields
API Standardise Relation interface
2016-01-21 15:40:19 +13:00

12 lines
368 B
Scheme

<% if $Options %>
<optgroup label="$Title.ATT">
<% loop $Options %>
<% include GroupedDropdownFieldOption %>
<% end_loop %>
</optgroup>
<% else %>
<option value="$Value.ATT"
<% if $Selected %> selected="selected"<% end_if %>
<% if $Disabled %> disabled="disabled"<% end_if %>
><% if $Title %>$Title.XML<% else %>&nbsp;<% end_if %></option>
<% end_if %>