{% extends 'base.html' %} {% load custom_tags_and_filters %} {% block title %}{% if form.instance.id %}Modify user{% else %}New user{% endif %}{% endblock %} {% block extrahead %} {% load static %} {% endblock %} {% block content %} {% if form.errors %}
Oops! Something went wrong. Please correct the errors highlighted below.
{{ form.non_field_errors }}
{% endif %} {% if warning %}
{{ warning }}
{% endif %}
{% if form.instance.id %} Search for another user
View user history
{% if form.is_active.value %}Safely deactivate this user
{% endif %} {% endif %}

{% if form.instance.id %}Modify user{% else %}New user{% endif %}

{% csrf_token %} {% if form.instance.id %}{% endif %}
{% if form.first_name.errors %}
{{ form.first_name.errors|striptags }}
{% endif %}
{% if form.last_name.errors %}
{{ form.last_name.errors|striptags }}
{% endif %}
{% if form.username.errors %}
{{ form.username.errors|striptags }}
{% endif %}
{% if form.email.errors %}
{{ form.email.errors|striptags }}
{% endif %}
{% if form.badge_number.errors %}
{{ form.badge_number.errors|striptags }}
{% endif %}
{% if form.access_expiration.errors %}
{{ form.access_expiration.errors|striptags }}
{% endif %}
{% if form.instance.id %}
Date joined
{{ form.instance.date_joined }}
Last login
{{ form.instance.last_login|default_if_none:"Never" }}
{% endif %}
{% if identity_service_domains|length == 1 %}
{{ identity_service_domains.0 }}
{% elif identity_service_domains|length > 1 %}
{% for d in identity_service_domains %}
{% endfor %}
{% endif %}
This user has no assigned projects.
This user is not qualified to use any tools.
{% if physical_access_levels or externally_managed_access_levels %}
Physical access levels
{% if physical_access_levels %}
Tablet controlled
{% for level in physical_access_levels %}
{% endfor %}
{% endif %} {% if externally_managed_physical_access_levels %}
Badge-reader controlled
{% for level in externally_managed_physical_access_levels %}
{% endfor %}
{% endif %}
{% endif %}
{% if identity_service_available and form.instance.id and user_identity_information.can_reset_password_and_unlock_account %}
{% csrf_token %}
{# Account unlock can only be performed if the account is currently in the locked state. #} {% if user_identity_information.account_locked %}
{% csrf_token %}
{% endif %} {% endif %} {% endblock %}