2018-07-06 11:10:14 +01:00
|
|
|
{% extends "views/platform-admin/_base_template.html" %}
|
|
|
|
|
{% from "components/page-footer.html" import page_footer %}
|
2018-09-19 12:39:36 +01:00
|
|
|
{% from "components/form.html" import form_wrapper %}
|
2020-01-30 11:44:20 +00:00
|
|
|
{% from "components/button/macro.njk" import govukButton %}
|
2018-07-06 11:10:14 +01:00
|
|
|
|
|
|
|
|
{% block per_page_title %}
|
2018-07-10 17:24:20 +01:00
|
|
|
Find users by email
|
2018-07-06 11:10:14 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
|
|
2020-04-23 11:08:43 +01:00
|
|
|
<h1 class="heading-medium">
|
2018-07-10 17:24:20 +01:00
|
|
|
Find users by email
|
2018-07-06 11:10:14 +01:00
|
|
|
</h1>
|
|
|
|
|
|
2018-09-19 12:39:36 +01:00
|
|
|
|
|
|
|
|
{% call form_wrapper(
|
|
|
|
|
action=url_for('.find_users_by_email'),
|
2020-02-19 11:57:15 +00:00
|
|
|
class='govuk-grid-row'
|
2018-09-19 12:39:36 +01:00
|
|
|
) %}
|
2020-02-20 16:55:56 +00:00
|
|
|
<div class="govuk-grid-column-three-quarters">
|
2018-07-06 11:10:14 +01:00
|
|
|
{{ textbox(
|
|
|
|
|
form.search,
|
|
|
|
|
width='1-1',
|
2018-07-10 17:24:20 +01:00
|
|
|
label='Find users by email, or by partial email'
|
2018-07-06 11:10:14 +01:00
|
|
|
) }}
|
|
|
|
|
</div>
|
2020-02-19 12:53:59 +00:00
|
|
|
<div class="govuk-grid-column-one-quarter">
|
2018-07-06 11:10:14 +01:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
2020-01-30 11:44:20 +00:00
|
|
|
{{ govukButton({
|
|
|
|
|
"text": "Search",
|
|
|
|
|
"classes": "search-form__button"
|
|
|
|
|
}) }}
|
2018-07-06 11:10:14 +01:00
|
|
|
</div>
|
2018-09-19 12:39:36 +01:00
|
|
|
{% endcall %}
|
2018-07-06 11:10:14 +01:00
|
|
|
|
2018-09-19 12:39:36 +01:00
|
|
|
{% call form_wrapper(id='search-form' ) %}
|
2018-07-06 11:10:14 +01:00
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
2018-09-19 12:39:36 +01:00
|
|
|
{% endcall %}
|
2018-07-06 11:10:14 +01:00
|
|
|
|
2018-07-06 16:16:21 +01:00
|
|
|
{% if users_found %}
|
|
|
|
|
<nav class="browse-list">
|
|
|
|
|
<ul>
|
|
|
|
|
{% for user in users_found %}
|
|
|
|
|
<li class="browse-list-item">
|
2019-12-06 07:53:46 +00:00
|
|
|
<a href="{{url_for('.user_information', user_id=user.id)}}" class="govuk-link govuk-link--no-visited-state browse-list-link">{{ user.email_address }}</a>
|
2018-07-10 17:24:20 +01:00
|
|
|
<p class="browse-list-hint">{{ user.name }}</p>
|
2018-07-06 16:16:21 +01:00
|
|
|
</li>
|
|
|
|
|
<hr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
{% elif users_found == [] %}
|
2018-07-16 15:04:03 +01:00
|
|
|
<p class="browse-list-hint">No users found.</p>
|
2018-07-06 16:16:21 +01:00
|
|
|
{% endif %}
|
2018-07-06 11:10:14 +01:00
|
|
|
{% endblock %}
|