mirror of
https://github.com/Bornholm/formidable.git
synced 2024-12-24 15:59:34 +01:00
22 lines
828 B
Cheetah
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}} |