{% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {%- block title -%} {% if user.uid == edited_user.uid %} {%- trans %}My profile{% endtrans -%} {% else %} {%- trans %}User profile edition{% endtrans -%} {% endif %} {%- endblock -%} {% block script %} {% endblock %} {% block submenu %} {% 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.uid == user.uid or lock_indicator or noindicator %} {{ fui.render_field(field, **kwargs) }} {% elif field.name in edited_user.write %} {{ fui.render_field(field, **kwargs) }} {% elif field.name in edited_user.read %} {{ 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 %} {% if self_deletion or user.can_manage_users %} {% endif %}

{% trans %}Account information{% endtrans %}

{% call fui.render_form(form, class_="profile-form info warning") %} {% if "uid" in form %} {% block uid_field scoped %}{{ render_field(form.uid) }}{% endblock %} {% endif %} {% if "groups" in form %} {% block groups_field scoped %}{{ render_field(form.groups) }}{% endblock %} {% endif %} {% 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.uid != user.uid 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 %} {% endif %}
{% if user.can_manage_users or self_deletion %} {% endif %} {% if user.can_impersonate_users and user.uid != edited_user.uid %} {{ _("Impersonate") }} {% endif %}
{% endcall %}
{% endblock %}