2023-10-03 16:29:55 -04:00
|
|
|
{% comment %}
|
|
|
|
Include a hidden field of the same name to ensure that unchecked checkboxes
|
2023-12-05 15:09:59 -05:00
|
|
|
are always included in the submitted form data. Omit fields names
|
|
|
|
_selected_action to avoid breaking the admin UI.
|
2023-10-03 16:29:55 -04:00
|
|
|
{% endcomment %}
|
2023-12-05 15:09:59 -05:00
|
|
|
{% if widget.name != '_selected_action' %}<input type="hidden" name="{{ widget.name }}" value="">{% endif %}
|
2024-01-19 14:02:33 -05:00
|
|
|
<input type="checkbox" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value|stringformat:'s' }}"{% endif %} {% include "django/forms/widgets/attrs.html" %} class="form-check-input{% if 'class' in widget.attrs %} {{ widget.attrs.class }}{% endif %}">
|