{% extends "admin/base_admin.html.twig" %} {% import "helper.twig" as helper %} {# @var entity \App\Entity\UserSystem\User #} {% block card_title %} {% trans %}user.edit.caption{% endtrans %} {% endblock %} {% block comment %}{% endblock %} {% block additional_pills %} {% endblock %} {% block nav_pills_container %}
{{ parent() }}
{% if entity.id is not null and is_granted('CAN_SWITCH_USER', entity) %} {% trans %}user.impersonate.btn{% endtrans %} {% endif %}
{% endblock %} {% block additional_controls %} {{ form_row(form.group) }} {{ form_row(form.first_name) }} {{ form_row(form.last_name) }} {{ form_row(form.email) }} {{ form_row(form.showEmailOnProfile) }} {{ form_row(form.department) }} {{ form_row(form.aboutMe) }} {% endblock %} {% block additional_panes %}
{{ form_row(form.language) }} {{ form_row(form.timezone) }} {{ form_row(form.theme) }} {{ form_row(form.currency) }}
{% if entity.samlUser %}
{% trans %}user.saml_user{% endtrans %}
{% endif %} {{ form_row(form.new_password) }} {{ form_row(form.need_pw_change) }} {{ form_row(form.disabled) }} {% if entity.id is not null %}

{% trans %}user.edit.tfa.caption{% endtrans %}

{% trans %}user.edit.tfa.google_active{% endtrans %}: {{ helper.boolean(entity.googleAuthenticatorEnabled) }}

{% trans %}tfa_backup.remaining_tokens{% endtrans %}: {{ entity.backupCodes | length }}

{% trans %}tfa_backup.generation_date{% endtrans %}: {% if entity.backupCodesGenerationDate is not null %} {{ entity.backupCodesGenerationDate | format_datetime }} {% else %} {% trans %}user.edit.tfa.disabled{% endtrans %} {% endif %}

{% trans %}user.edit.tfa.u2f_keys_count{% endtrans %}: {% if entity.webAuthnAuthenticatorEnabled %} {{ (entity.webauthnKeys | length) + (entity.legacyU2FKeys | length) }} {% else %} {% trans %}user.edit.tfa.disabled{% endtrans %} {% endif %}

{% set tfa_disable_disabled = not is_granted('set_password', entity) %} {# Disable button when he has no 2FA activated #} {% if not entity.webAuthnAuthenticatorEnabled and not entity.googleAuthenticatorEnabled and entity.backupCodes is empty %} {% set tfa_disable_disabled = true %} {% endif %}
{% endif %}
{{ form_row(form.permissions) }}
{% endblock %} {% block edit_title %} {% trans %}user.edit{% endtrans %}: {{ entity.name }} {% endblock %} {% block new_title %} {% trans %}user.new{% endtrans %} {% endblock %} {% block preview_picture %} {% endblock %}