{% extends 'mtp_common/user_admin/base.html' %} {% load i18n %} {% load mtp_common %} {% block page_title %}{{ page_title }} – {{ block.super }}{% endblock %} {% block admin_content %}

{{ page_title }}

{% trans 'Add, view, edit or disable user accounts.' %} {% trans 'When you disable a user account, that user will be unable to log in.' %}

{% if form.cleaned_data.locked_users_exist %}

{% trans 'If a user enters a wrong password too many times, they are locked out for a short period.' %} {% trans 'You can allow them to log in now by clicking ‘Unlock’.' %}

{% endif %}

{% trans 'Add a new user' %}

{% if form.cleaned_data.account_requests %}

{% trans 'New user requests' %}

{% for account_request in form.cleaned_data.account_requests %} {% endfor %}
{% trans 'Table of new user requests' %}
{% trans 'Name' %} {% trans 'Email' %}
{{ account_request.first_name }} {{ account_request.last_name }} {{ account_request.email }}
{% endif %}

{% trans 'Edit existing users' %}

{% include 'mtp_common/forms/field.html' with field=form.simple_search input_classes='govuk-input--width-20' only %}
{% if form.cleaned_data.simple_search %} {% trans 'Clear filters' %} {% endif %}
{% include 'govuk-frontend/components/error-summary.html' with form=form only %} {% if form.is_valid %}
{% for user in form.cleaned_data.users %} {% if can_delete or user.is_active %} {% if user.user_admin %} {% else %} {% endif %} {% endif %} {% empty %} {% endfor %}
{% trans 'Table of existing users' %}
{% trans 'Name' %} {% trans 'Email' %}
{{ user.first_name }} {{ user.last_name }} {{ user.email }}
{% trans 'No users found' %}
{% page_list page=form.cleaned_data.page page_count=form.cleaned_data.page_count query_string=form.cleaned_data.query_string %}

{% blocktrans trimmed count count=form.cleaned_data.user_count %} {{ count }} user {% plural %} {{ count }} users {% endblocktrans %}

{% endif %} {% endblock %}