silverstripe-framework/admin/themes/cms-forms/templates/SelectionGroup.ss
Damian Mooyman c9b6e9bac0
API Update template lookup to late resolution for performance reasons
API Update behaviour of form fields to use standard template lookup mechanism
API Support custom "type" parameter to template lookup
2016-09-06 12:54:03 +12:00

34 lines
994 B
Scheme

<ul class="list-unstyled selection-group">
<% if $IsReadonly %>
<% loop $FieldSet %>
<% if $Selected %>
<li class="selected selection-group__item" id="$HolderID">
$RadioLabel
<%-- Bypass composite item field and directly render child fields --%>
<% if $FieldList %>
<div class="selection-group selection-group__item__fieldlist" id="$ID">
<% loop $FieldList %>
$Fieldholder
<% end_loop %>
</div>
<% end_if %>
</li>
<% end_if %>
<% end_loop %>
<% else %>
<% loop $FieldSet %>
<li class="selection-group__item<% if $Selected %> selected<% end_if %>" id="$HolderID">
{$RadioButton}{$RadioLabel}
<%-- Bypass composite item field and directly render child fields --%>
<% if $FieldList %>
<div class="selection-group selection-group__item__fieldlist" id="$ID">
<% loop $FieldList %>
$Fieldholder
<% end_loop %>
</div>
<% end_if %>
</li>
<% end_loop %>
<% end_if %>
</ul>