mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
find_users_by_email view calls API and feeds results to template
Template then displays the results. Page displays a message if no results found
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
{{ textbox(
|
||||
form.search,
|
||||
width='1-1',
|
||||
label='Find users by e-mail'
|
||||
label='Find users by e-mail, or by partial e-mail'
|
||||
) }}
|
||||
</div>
|
||||
<div class="column-one-quarter align-button-with-textbox">
|
||||
@@ -37,4 +37,19 @@
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
</form>
|
||||
|
||||
{% if users_found %}
|
||||
<nav class="browse-list">
|
||||
<ul>
|
||||
{% for user in users_found %}
|
||||
<li class="browse-list-item">
|
||||
<a href="#" class="browse-list-link">{{ user.email_address }}</a>
|
||||
<p class="browse-list-sub-item">{{ user.name }}</p>
|
||||
</li>
|
||||
<hr>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% elif users_found == [] %}
|
||||
<p>No users found.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user