mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-12 09:58:50 -04:00
Fix new checkboxes
Problems: - WTForms expects the value of checkboxes to always be `y` (they don’t work like radio buttons, which is where I copied this code for) - WTForms `BooleanField`s don’t have a checked attribute, they set their data attibute to `True` or `False`
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
) %}
|
||||
<div class="multiple-choice">
|
||||
<input
|
||||
id="{{ field.id }}" name="{{ field.name }}" type="checkbox" value="{{ field.data }}"
|
||||
{% if field.checked %}
|
||||
id="{{ field.id }}" name="{{ field.name }}" type="checkbox" value="y"
|
||||
{% if field.data %}
|
||||
checked
|
||||
{% endif %}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user