cyberstammtisch-silverstripe/themes/starter/templates/SilverStripe/Forms/CheckboxSetField.ss
2021-10-20 13:45:30 +02:00

21 lines
775 B
Scheme
Executable file

<% if $Options %>
<% loop $Options %>
<div class="{$Class.ATT} form-check form-check-inline">
<input
id="{$ID.ATT}"
class="form-check-input"
name="{$Name.ATT}"
type="checkbox"
value="{$Value.ATT}"
aria-labelledby="option-title-{$ID.ATT}"
<% if $isChecked %>checked="checked"<% end_if %>
<% if $isDisabled %>disabled="disabled"<% end_if %>
/>
<label id="option-title-{$ID.ATT}" for="$ID.ATT" class="form-check-label">
{$Title}
</label>
</div>
<% end_loop %>
<% else %>
<p class="form-text"><%t CWP_Form.NoOptions "No options available" %></p>
<% end_if %>