{% 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 %} {% endblock %} {% macro render_field(field, noindicator=false) %} {% set lock_indicator = field.render_kw and ("readonly" in field.render_kw or "disabled" in field.render_kw) %} {% if edited_user.user_name == user.user_name or lock_indicator or noindicator %} {{ fui.render_field(field, **kwargs) }} {% elif field.name in edited_user._writable_fields %} {{ fui.render_field(field, **kwargs) }} {% elif field.name in edited_user._readable_fields %} {{ fui.render_field(field, indicator_icon="eye", indicator_text=_("This user cannot edit this field"), **kwargs) }} {% else %} {{ fui.render_field(field, indicator_icon="eye slash", indicator_text=_("This user cannot see this field"), **kwargs) }} {% endif %} {% endmacro %} {% 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 %}{{ render_field(form.user_name) }}{% endblock %} {% endif %} {% if has_account_lockability and "lock_date" in form and not edited_user.locked %} {% block lock_date_field scoped %}{{ render_field(form.lock_date) }}{% endblock %} {% endif %} {% if "groups" in form %} {% block groups_field scoped %}{{ render_field(form.groups) }}{% endblock %} {% endif %}

{% trans %}Password{% endtrans %}

{% trans %} You can change your password here by typing it once it each fields below. The more a password is long, the more it is strong. A good password is a long password that you will remember, not a complicated password that your use for all your accounts. {% endtrans %}
{% if "password1" in form %} {% block password_field scoped %}
{{ render_field(form.password1, noindicator=true) }} {{ render_field(form.password2, noindicator=true) }}
{% endblock %} {% endif %} {% if user.can_manage_users %} {% if not edited_user.has_password() %}
{% if has_smtp and edited_user.can_edit_self %} {% endif %}
{% trans %}This user does not have a password yet{% endtrans %}
{% if has_smtp and edited_user.can_edit_self %}

{% trans %}You can solve this by:{% endtrans %}

{% else %}

{% trans %}The user will not be able to authenticate unless the password is set{% endtrans %}

{% endif %}
{% elif has_smtp and edited_user.user_name != user.user_name and edited_user.has_password() and edited_user.can_edit_self %}
{% trans %}Password reset{% endtrans %}

{% trans %}If the user has forgotten his password, you can send him a password reset email by clicking this button.{% endtrans %}

{% endif %} {% if has_account_lockability and edited_user.locked %}
{% trans %}This user account is locked{% endtrans %}

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

{% endif %} {% endif %}
{% if has_account_lockability and "lock_date" in user._writable_fields and not edited_user.locked %} {% endif %} {% if user.can_manage_users or self_deletion %} {% endif %} {% if user.can_impersonate_users and user.identifier != edited_user.identifier %} {{ _("Impersonate") }} {% endif %}
{% endcall %}
{% endblock %}