formidable/internal/server/template/blocks/form_input_boolean.html.tmpl
William Petit f4b3d8f532 feat: aggregate defaults and values
- Output merged defaults and values
- Add "check" command
2022-09-27 22:23:18 +02:00

22 lines
828 B
Cheetah

{{define "form_input_boolean"}}
{{ $fullProperty := getFullProperty .Parent .Property }}
{{ $checked := getValue .Values $fullProperty }}
<label for="yes:{{ $fullProperty }}" class="inline-flex items-center mt-3">
<input type="radio"
class="h-5 w-5 text-gray-600"
id="yes:{{ $fullProperty }}"
name="bool:{{ $fullProperty }}"
value="yes"
{{if $checked}}checked="yes"{{end}} />
<span class="ml-2 text-gray-700">Yes</span>
</label>
<label for="no:{{ $fullProperty }}" class="inline-flex items-center mt-3 ml-3">
<input type="radio"
class="h-5 w-5 text-gray-600"
id="no:{{ $fullProperty }}"
name="bool:{{ $fullProperty }}"
value="no"
{{if not $checked}}checked{{end}} />
<span class="ml-2 text-gray-700">No</span>
</label>
{{end}}