Files
notifications-admin/app/templates/components/live-search.html
Tom Byers d21b9475ba 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.
2020-08-12 10:34:50 +01:00

21 lines
573 B
HTML

{% from "components/textbox.html" import textbox %}
{% macro live_search(
target_selector=None,
show=False,
form=None,
label=None
) %}
{%- set search_label = label or form.search.label.text %}
{% if show %}
<div data-module="autofocus">
<div class="live-search js-header" data-module="live-search" data-targets="{{ target_selector }}">
{{ form.search(param_extensions={
"label": {"text": search_label},
"autocomplete": "off"
}) }}
</div>
</div>
{% endif %}
{% endmacro %}