From dd4935212a6dd5ff497e97184ef918a178f2c6a3 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 7 May 2019 21:47:34 +0200 Subject: [PATCH] templates: uses login_password_profile.html to render password related actions (#32887) --- templates/auth/login_password_profile.html | 0 templates/authentic2/accounts.html | 14 +++++--------- templates/authentic2/login_password_profile.html | 7 +++++++ 3 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 templates/auth/login_password_profile.html create mode 100644 templates/authentic2/login_password_profile.html diff --git a/templates/auth/login_password_profile.html b/templates/auth/login_password_profile.html deleted file mode 100644 index e69de29b..00000000 diff --git a/templates/authentic2/accounts.html b/templates/authentic2/accounts.html index 826d0b0c..9845d913 100644 --- a/templates/authentic2/accounts.html +++ b/templates/authentic2/accounts.html @@ -37,13 +37,7 @@ {% if allow_email_change %}
  • Modifier le courriel associé
  • {% endif %} - {% if user.can_change_password %} - {% if user.has_usable_password %} -
  • Modifier le mot de passe
  • - {% else %} -
  • Définir un mot de passe
  • - {% endif %} - {% endif %} + {% frontends_block_by_id.password %} {% if profile_edit_url %}
  • Éditer les données du compte
  • {% elif allow_profile_edit %} @@ -58,8 +52,10 @@ {% for id, block in frontends_block_by_id.items %}
    -

    {{ block.name }}

    - {{ block.content|safe }} + {% if id != "password" %} +

    {{ block.name }}

    + {{ block.content|safe }} + {% endif %}
    {% endfor %} diff --git a/templates/authentic2/login_password_profile.html b/templates/authentic2/login_password_profile.html new file mode 100644 index 00000000..9463a640 --- /dev/null +++ b/templates/authentic2/login_password_profile.html @@ -0,0 +1,7 @@ +{% if can_change_password %} + {% if has_usable_password %} +
  • Modifier le mot de passe
  • + {% else %} +
  • Définir un mot de passe
  • + {% endif %} +{% endif %} -- 2.20.1