mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Add find-as-you-type on the choose template page
Not everyone knows how to use `ctrl` + `f`, and it’s not scoped to just the list of templates. The template you want to work with is often not the first one in the list, but ordering by created at is useful for other reasons (mainly around first time use). This commit adds a find as you type control which aims to give users a quick way of getting to the template they want to work with.
This commit is contained in:
@@ -22,7 +22,7 @@ from wtforms import (
|
||||
FieldList,
|
||||
DateField,
|
||||
SelectField)
|
||||
from wtforms.fields.html5 import EmailField, TelField
|
||||
from wtforms.fields.html5 import EmailField, TelField, SearchField
|
||||
from wtforms.validators import (DataRequired, Email, Length, Regexp, Optional)
|
||||
|
||||
from app.main.validators import (Blacklist, CsvFileValidator, ValidGovEmail, NoCommasInPlaceHolders, OnlyGSMCharacters)
|
||||
@@ -591,3 +591,8 @@ class ChooseTemplateType(Form):
|
||||
('sms', 'Text message'),
|
||||
('letter', 'Letter') if include_letters else None
|
||||
])
|
||||
|
||||
|
||||
class SearchTemplatesForm(Form):
|
||||
|
||||
search = SearchField('Search by name')
|
||||
|
||||
Reference in New Issue
Block a user