{% 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 }}

{% if form.create %}

{% trans 'Fill in a user’s details to allow them access.' %} {% trans 'You can give them a general user or an account management role.' %}

{% if permissions_note %}

{{ permissions_note }}

{% endif %} {% endif %}
{% csrf_token %} {% include 'govuk-frontend/components/error-summary.html' with form=form only %} {% if form.create %} {% include 'mtp_common/forms/field.html' with field=form.username input_classes='govuk-input--width-10' only %} {% else %}

{% trans 'Username' %} {{ form.username.value }}

{% endif %} {% include 'mtp_common/forms/field.html' with field=form.first_name input_classes='govuk-input--width-20' only %} {% include 'mtp_common/forms/field.html' with field=form.last_name input_classes='govuk-input--width-20' only %} {% include 'mtp_common/forms/field.html' with field=form.email input_classes='govuk-input--width-20' only %} {% with field=form.role %} {% if field.field.choices %} {% endif %} {% endwith %} {% with field=form.user_admin %} {% if field %} {% include 'mtp_common/forms/checkbox-field.html' with field=field only %} {% endif %} {% endwith %}
{% trans 'Cancel' %}
{% if is_active is True %} {% include 'govuk-frontend/components/section-break.html' with visible=True size='l' %}

{% trans 'This user can log in.' %}

{% trans 'Disable this user' %}

{% elif is_active is False %} {% include 'govuk-frontend/components/section-break.html' with visible=True size='l' %}

{% trans 'This user cannot log in.' %}

{% trans 'Enable this user' %}

{% endif %}
{% endblock %}