mirror of
https://github.com/Bornholm/formidable.git
synced 2024-12-23 23:39:33 +01:00
22 lines
838 B
Cheetah
22 lines
838 B
Cheetah
{{define "form_input_boolean"}}
|
|
{{ $fullProperty := getFullProperty .Parent .Property }}
|
|
{{ $checked := getValue .Defaults .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}} |