{% load i18n %}
{% if not user.is_active and user.deactivation_reason == "self_deletion" or user.deactivation_reason == "moderator_deletion" %}
{% trans "Permanently deleted" %}
{% else %}

{% trans "User Actions" %}

{% if user.is_active %}

{% trans "Send direct message" %}

{% endif %} {% if not user.is_active and user.deactivation_reason == "pending" %}
{% csrf_token %}
{% endif %} {% if user.is_active or user.deactivation_reason == "pending" %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% if user.local %}
{% trans "Permanently delete user" as button_text %} {% include "snippets/toggle/open_button.html" with controls_text="delete_user" text=button_text class="is-danger is-light" %}
{% endif %}
{% if user.local %}
{% include "settings/users/delete_user_form.html" with controls_text="delete_user" class="mt-2 mb-2" %}
{% endif %} {% if user.local %}
{% csrf_token %} {% if group_form.non_field_errors %} {{ group_form.non_field_errors }} {% endif %} {% with group=user.groups.first %}
{% include 'snippets/form_errors.html' with errors_list=group_form.groups.errors id="desc_user_group" %} {% endwith %}
{% endif %}
{% endif %}