diff --git a/app/assets/stylesheets/components/page-footer.scss b/app/assets/stylesheets/components/page-footer.scss index 61b04299b..c1874c397 100644 --- a/app/assets/stylesheets/components/page-footer.scss +++ b/app/assets/stylesheets/components/page-footer.scss @@ -53,11 +53,11 @@ .search-form__button { @include media(desktop) { position: relative; - top: 32px; + top: 30px; left: -30px; width: 100%; margin-right: -30px; - padding-top: 7px; + padding-top: 9px; box-sizing: content-box; &:active { diff --git a/app/main/forms.py b/app/main/forms.py index 72535b410..0d65972f6 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -1760,7 +1760,7 @@ class RequiredDateFilterForm(StripWhitespaceForm): class SearchByNameForm(StripWhitespaceForm): - search = SearchField( + search = GovukSearchField( 'Search by name', validators=[DataRequired("You need to enter full or partial name to search by.")], ) @@ -1768,7 +1768,7 @@ class SearchByNameForm(StripWhitespaceForm): class SearchUsersByEmailForm(StripWhitespaceForm): - search = SearchField( + search = GovukSearchField( 'Search by name or email address', validators=[ DataRequired("You need to enter full or partial email address to search by.") @@ -1778,12 +1778,12 @@ class SearchUsersByEmailForm(StripWhitespaceForm): class SearchUsersForm(StripWhitespaceForm): - search = SearchField('Search by name or email address') + search = GovukSearchField('Search by name or email address') class SearchNotificationsForm(StripWhitespaceForm): - to = SearchField() + to = GovukSearchField() labels = { 'email': 'Search by email address', diff --git a/app/main/views/jobs.py b/app/main/views/jobs.py index f60f6879f..36b83bf4d 100644 --- a/app/main/views/jobs.py +++ b/app/main/views/jobs.py @@ -164,10 +164,9 @@ def view_notifications(service_id, message_type=None): message_type=message_type, status=request.args.get('status') or 'sending,delivered,failed', page=request.args.get('page', 1), - to=request.form.get('to', ''), search_form=SearchNotificationsForm( message_type=message_type, - to=request.form.get('to', ''), + to=request.form.get('to'), ), things_you_can_search_by={ 'email': ['email address'], diff --git a/app/templates/components/live-search.html b/app/templates/components/live-search.html index 6c7b1fad8..6ba673350 100644 --- a/app/templates/components/live-search.html +++ b/app/templates/components/live-search.html @@ -10,12 +10,10 @@ {% if show %}
{% endif %} diff --git a/app/templates/views/find-services/find-services-by-name.html b/app/templates/views/find-services/find-services-by-name.html index e83211ab9..630075420 100644 --- a/app/templates/views/find-services/find-services-by-name.html +++ b/app/templates/views/find-services/find-services-by-name.html @@ -19,11 +19,9 @@ class='govuk-grid-row' ) %}
- {{ textbox( - form.search, - width='1-1', - label='Find services by name, or by partial name' - ) }} + {{ form.search(param_extensions={ + "label": {"text": "Find services by name, or by partial name"} + }) }}
diff --git a/app/templates/views/find-users/find-users-by-email.html b/app/templates/views/find-users/find-users-by-email.html index 49957d753..34722afa5 100644 --- a/app/templates/views/find-users/find-users-by-email.html +++ b/app/templates/views/find-users/find-users-by-email.html @@ -19,11 +19,9 @@ class='govuk-grid-row' ) %}
- {{ textbox( - form.search, - width='1-1', - label='Find users by email, or by partial email' - ) }} + {{ form.search(param_extensions={ + "label": {"text": "Find users by email, or by partial email"} + }) }}
diff --git a/app/templates/views/notifications.html b/app/templates/views/notifications.html index b675555af..9c40a27c7 100644 --- a/app/templates/views/notifications.html +++ b/app/templates/views/notifications.html @@ -41,17 +41,17 @@ class="govuk-grid-row" ) %}
- {{ textbox( - search_form.to, - width='1-1', - label=things_you_can_search_by|formatted_list( - conjunction='or', - before_each='', - after_each='', - prefix='Search by', - prefix_plural='Search by' - ) - ) }} + {{ search_form.to(param_extensions={ + "label": { + "text": things_you_can_search_by|formatted_list( + conjunction='or', + before_each='', + after_each='', + prefix='Search by', + prefix_plural='Search by' + ) + } + }) }}
@@ -63,7 +63,7 @@ {% endcall %} {% call form_wrapper(id="search-form") %} - + {% endcall %} diff --git a/app/templates/views/templates/choose-reply.html b/app/templates/views/templates/choose-reply.html index e89f74729..9043685e0 100644 --- a/app/templates/views/templates/choose-reply.html +++ b/app/templates/views/templates/choose-reply.html @@ -35,7 +35,7 @@ {% else %} - {{ live_search(target_selector='#template-list .govuk-grid-column-full', show=True, form=search_form) }} + {{ live_search(target_selector='#template-list .template-list-item', show=True, form=search_form) }}