oef/templates/layout/checkbox.html.tpl

12 lines
510 B
Smarty
Raw Permalink Normal View History

2019-11-04 15:00:46 +01:00
{{define "checkbox"}}
<div class="{{if .options.formClass}}{{.options.formClass}}{{else}}form-group{{end}}">
<input type="checkbox"
name="{{.options.name}}"
class="form-check-input"
id="{{.options.id}}"
{{if .update}}{{if eq true .value}}checked{{end}}{{end}} {{.options.required}}>
<label class="form-check-label" for="{{.options.id}}">{{.options.label}}</label>
{{if .options.help}}<small class="form-text text-muted">{{.options.help}}</small>{{end}}
</div>
{{end}}