mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-14 23:44:56 -05:00
Stop whitelist form autocompleting
The browser tries to be helpful by autofilling email addresses and phone numbers. But it gets confused and tries to fill all the fields with the same email address or phone number. This looks broken. This commit disables autocomplete for these form fields.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
{% macro list_entry(
|
||||
field,
|
||||
item_name,
|
||||
hint=''
|
||||
hint='',
|
||||
autocomplete=True
|
||||
) %}
|
||||
|
||||
{% if error %}
|
||||
@@ -40,6 +41,7 @@
|
||||
id="input-{{ field.name }}-{{ index }}"
|
||||
class="form-control form-control-1-1"
|
||||
value="{{ field.data[index] }}"
|
||||
{% if not autocomplete %}autocomplete="off"{% endif %}
|
||||
/>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
{{ list_entry(
|
||||
form.email_addresses,
|
||||
item_name='email address',
|
||||
autocomplete=False
|
||||
) }}
|
||||
|
||||
{{ list_entry(
|
||||
form.phone_numbers,
|
||||
item_name='phone number',
|
||||
autocomplete=False
|
||||
) }}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user