{# The password authentication factor template. Displays the password management form. :param edited_user: The user being edited. :type edited_user: :class:`~canaille.core.models.User` :param form: The password form. :type form: :class:`~flask_wtf.FlaskForm` #} {% extends theme('base.html') %} {% import 'macro/form.html' as fui %} {% import 'core/partial/profile_field.html' as profile_field %} {%- 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 %}Password{% endtrans %}

{% call fui.render_form(form, class_="profile-form info warning") %}
{% trans %} You can change your password here by typing it once in each field below. The longer the password, the stronger it is. 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 %}
{{ profile_field.render_field(form.password1, user=user, edited_user=edited_user, noindicator=true) }} {{ profile_field.render_field(form.password2, user=user, edited_user=edited_user, noindicator=true) }}
{% endif %} {% if user.can_manage_users %} {% if not edited_user.has_password() %}
{% if features.has_smtp and edited_user.can_edit_self %} {% endif %}
{% trans %}This user does not have a password yet{% endtrans %}
{% if features.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 features.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 %} {% endif %}
{% endcall %}
{% endblock %}