Files
WYGIWYH/app/templates/transactions/widgets/unselectable_paid_toggle_button.html
2025-10-28 14:13:30 -03:00

20 lines
1.0 KiB
HTML

{% load i18n %}
{% load crispy_forms_field %}
<div class="tw:form-group tw:mb-3">
<div class="tw:join tw:w-full" role="group" aria-label="{{ field.label }}">
<input type="radio" class="tw:join-item tw:btn tw:btn-neutral" name="{{ field.name }}" id="{{ field.id_for_label }}_null"
value="" aria-label="{% trans 'Unchanged' %}" {% if field.value is None %}checked{% endif %}>
<input type="radio" class="tw:join-item tw:btn tw:btn-primary" name="{{ field.name }}" id="{{ field.id_for_label }}_false"
value="false" aria-label="{% trans 'Projected' %}" {% if field.value is False %}checked{% endif %}">
<input type="radio" class="tw:join-item tw:btn tw:btn-success" name="{{ field.name }}" id="{{ field.id_for_label }}_true"
value="true" aria-label="{% trans 'Paid' %}" {% if field.value is True %}checked{% endif %}>
</div>
{% if field.help_text %}
<div class="tw:text-base-content/60 tw:text-sm tw:mt-1">{{ field.help_text|safe }}</div>
{% endif %}
</div>