{# .. screenshot:: |canaille|/profile/user/settings :context: user :align: right :width: 275px The user profile settings edition page. The profile settings template. Displays the user settings edition form. :param edited_user: The user that the form will edit. :type edited_user: :class:`~canaille.core.models.User` :param form: The user profile edition form. Dynamically built according to the user :attr:`~canaille.core.configuration.ACLSettings.READ` and :attr:`~canaille.core.configuration.ACLSettings.WRITE` permissions. The available fields are those appearing in *READ* and *WRITE*, those only appearing in *READ* are read-only. :type form: :class:`~flask_wtf.FlaskForm` :param self_deletion: Whether the editor is allowed to delete the account of the edited user. :type self_deletion: :class:`bool` #} {% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {%- block title -%} {% if user.user_name == edited_user.user_name %} {%- trans %}My profile{% endtrans -%} {% else %} {%- trans %}User profile edition{% endtrans -%} {% endif %} {%- endblock -%} {% block submenu %} {% trans %}Personal information{% endtrans %} {% trans %}Account settings{% endtrans %} {% trans %}Authentication{% endtrans %} {% endblock %} {% block content %}

{% trans %}Account settings{% endtrans %}
{% trans creation_datetime=edited_user.created|dateformat %}Created on {{ creation_datetime }}{% endtrans %}

{% call fui.render_form(form, class_="profile-form info warning") %} {% if "user_name" in form %} {% block user_name_field scoped %}{{ form.user_name() }}{% endblock %} {% endif %} {% if features.has_account_lockability and "lock_date" in form and not edited_user.locked %} {% block lock_date_field scoped %}{{ form.lock_date() }}{% endblock %} {% endif %} {% if "groups" in form %} {% block groups_field scoped %}{{ form.groups() }}{% endblock %} {% endif %} {% if features.has_account_lockability and edited_user.locked and user.can_manage_users %}
{% call fui.render_button(form.action, "unlock", class_="ui right floated button") %} {% trans %}Unlock{% endtrans %} {% endcall %}
{% trans %}This user account is locked{% endtrans %}

{% trans %}The user won't be able to connect until their account is unlocked.{% endtrans %}

{% endif %}
{% if features.has_account_lockability and "lock_date" in user.writable_fields and not edited_user.locked %} {% call fui.render_button(form.action, "lock-confirm", class_="ui right floated basic negative button confirm", id="lock", formnovalidate=True) %} {% trans %}Lock the account{% endtrans %} {% endcall %} {% endif %} {% if user.can_manage_users or self_deletion %} {% call fui.render_button(form.action, "delete-confirm", class_="ui right floated basic negative button confirm", id="delete", formnovalidate=True) %} {% if user.user_name != edited_user.user_name %} {{ _("Delete the user") }} {% else %} {{ _("Delete my account") }} {% endif %} {% endcall %} {% endif %} {% if user.can_impersonate_users and user.identifier != edited_user.identifier and not edited_user.locked %} {% call fui.render_button(form.action, "impersonate-confirm", class_="ui right floated basic button confirm", id="impersonate", formnovalidate=True) %} {{ _("Impersonate") }} {% endcall %} {% endif %} {% call fui.render_button(form.action, "edit-settings", class_="ui right floated primary button", id="edit-settings") %} {{ _("Edit") }} {% endcall %}
{% endcall %}
{% endblock %}