mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 01:18:24 -04:00
Convert SearchFields to GovukSearchFields
Changes those fields in the following forms: - SearchByNameForm - SearchUsersByEmailForm - SearchUsersForm - SearchNotificationsForm Includes changes to templates that use this form and associated tests.
This commit is contained in:
@@ -19,11 +19,9 @@
|
||||
class='govuk-grid-row'
|
||||
) %}
|
||||
<div class="govuk-grid-column-three-quarters">
|
||||
{{ 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"}
|
||||
}) }}
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-quarter">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
|
||||
@@ -19,11 +19,9 @@
|
||||
class='govuk-grid-row'
|
||||
) %}
|
||||
<div class="govuk-grid-column-three-quarters">
|
||||
{{ 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"}
|
||||
}) }}
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-quarter">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
|
||||
@@ -41,17 +41,17 @@
|
||||
class="govuk-grid-row"
|
||||
) %}
|
||||
<div class="govuk-grid-column-three-quarters {% if message_type == 'sms' %}extra-tracking{% endif %}">
|
||||
{{ 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'
|
||||
)
|
||||
}
|
||||
}) }}
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-quarter">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
@@ -63,7 +63,7 @@
|
||||
{% endcall %}
|
||||
|
||||
{% call form_wrapper(id="search-form") %}
|
||||
<input type="hidden" name="to" value="{{ search_form.to.data }}">
|
||||
<input type="hidden" name="to" {% if search_form.to.data %}value="{{ search_form.to.data }}{% endif %}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
{% endcall %}
|
||||
|
||||
|
||||
@@ -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) }}
|
||||
|
||||
<nav id="template-list">
|
||||
{% for item in templates_and_folders %}
|
||||
|
||||
Reference in New Issue
Block a user