{% extends 'layouts/base.html' %} {% import 'macros/form_macros.html' as f %} {% set deletion_endpoint = 'admin.delete_user_request' %} {% set endpoints = [ ('admin.user_info', 'User information'), ('admin.change_user_email', 'Change email address'), ('admin.change_account_type', 'Change account type'), (deletion_endpoint, 'Delete user') ] %} {% macro navigation(items) %} {% endmacro %} {% macro user_info(user) %}
Full name{{ '%s %s' % (user.first_name, user.last_name) }}
Email address{{ user.email }}
Account type{{ user.role.name }}
{% endmacro %} {% block content %}
Back to all users

{{ user.full_name() }}
View and manage {{ user.first_name }}’s account.

{{ navigation(endpoints) }}
{% if request.endpoint == deletion_endpoint %}

This action is permanent
Deleting a user account is not a reversible change. Any information associated with this account will be removed, and cannot be recovered.

Delete this user
{% elif form %} {{ f.render_form(form) }} {% else %} {{ user_info(user) }} {% endif %}
{% endblock %}