[TASK] refactor steering checkbox

This commit is contained in:
Marie Birner
2023-09-28 16:07:52 +02:00
committed by philipp
parent 2ae01c0c65
commit 8cec4e4c11
3 changed files with 53 additions and 37 deletions

View File

@ -67,9 +67,9 @@
</div>
{% endmacro input %}
{% macro checkbox(label, name, id='', checked=false, class='') %}
{% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %}
<label for="{{ name }}{{ id }}" class="flex items-center cursor-pointer hover:text-gray-900 {{ class }}">
<input type="checkbox" id="{{ name }}{{ id }}" name="{{ name }}" {% if checked %} checked {% endif %} class="h-4 w-4 accent-primary-600 mr-2"/>
<input type="checkbox" id="{{ name }}{{ id }}" name="{{ name }}" {% if checked %} checked {% endif %} {% if disabled %} disabled {% endif %} class="h-4 w-4 accent-primary-600 mr-2"/>
{{ label }}
</label>
{% endmacro checkbox %}