2022-03-22 09:21:55 +01:00
|
|
|
{{define "form_input_boolean"}}
|
|
|
|
{{ $fullProperty := getFullProperty .Parent .Property }}
|
|
|
|
{{ $checked := getValue .Defaults .Values $fullProperty }}
|
2022-05-04 12:23:53 +02:00
|
|
|
<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>
|
2022-03-22 09:21:55 +01:00
|
|
|
</label>
|
2022-05-04 12:23:53 +02:00
|
|
|
<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>
|
2022-03-22 09:21:55 +01:00
|
|
|
</label>
|
|
|
|
{{end}}
|