mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 18:19:02 +02:00
feat: automated replacement
This commit is contained in:
@@ -1,22 +1,19 @@
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<div class="btn-group w-100" role="group" aria-label="{{ field.label }}">
|
||||
<input type="radio" class="btn-check" name="{{ field.name }}" id="{{ field.id_for_label }}_null"
|
||||
value="" {% if field.value is None %}checked{% endif %}>
|
||||
<label class="btn btn-outline-secondary w-100" for="{{ field.id_for_label }}_null">{% trans 'Unchanged' %}</label>
|
||||
<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="btn-check" name="{{ field.name }}" id="{{ field.id_for_label }}_false"
|
||||
value="false" {% if field.value is False %}checked{% endif %}">
|
||||
<label class="btn btn-outline-primary w-100" for="{{ field.id_for_label }}_false">{% trans 'Projected' %}</label>
|
||||
<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="btn-check" name="{{ field.name }}" id="{{ field.id_for_label }}_true"
|
||||
value="true" {% if field.value is True %}checked{% endif %}>
|
||||
<label class="btn btn-outline-success w-100" for="{{ field.id_for_label }}_true">{% trans 'Paid' %}</label>
|
||||
<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="help-text">{{ field.help_text|safe }}</div>
|
||||
<div class="tw:text-base-content/60 tw:text-sm tw:mt-1">{{ field.help_text|safe }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user