Projet

Général

Profil

0001-templates-uses-login_password_profile.html-to-render.patch

Benjamin Dauvergne, 07 mai 2019 21:49

Télécharger (2,47 ko)

Voir les différences:

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
templates/authentic2/accounts.html
37 37
      {% if allow_email_change %}
38 38
      <li><a href="{% url 'email-change' %}">Modifier le courriel associé</a></li>
39 39
      {% endif %}
40
      {% if user.can_change_password %}
41
        {% if user.has_usable_password %}
42
        <li><a href="{% url 'password_change' %}">Modifier le mot de passe</a></li>
43
        {% else %}
44
        <li><a href="{% url 'password_change' %}">Définir un mot de passe</a></li>
45
        {% endif %}
46
      {% endif %}
40
      {% frontends_block_by_id.password %}
47 41
      {% if profile_edit_url %}
48 42
      <li><a href="{{ profile_edit_url }}">Éditer les données du compte</a></li>
49 43
      {% elif allow_profile_edit %}
......
58 52
  </div>
59 53
  {% for id, block in frontends_block_by_id.items %}
60 54
  <div class="block" id="account-management-{{ id }}">
61
    <h2>{{ block.name }}</h2>
62
    {{ block.content|safe }}
55
    {% if id != "password" %}
56
      <h2>{{ block.name }}</h2>
57
      {{ block.content|safe }}
58
    {% endif %}
63 59
  </div>
64 60
  {% endfor %}
65 61
</div>
templates/authentic2/login_password_profile.html
1
{% if can_change_password %}
2
  {% if has_usable_password %}
3
    <li><a href="{% url 'password_change' %}">Modifier le mot de passe</a></li>
4
  {% else %}
5
    <li><a href="{% url 'password_change' %}">Définir un mot de passe</a></li>
6
  {% endif %}
7
{% endif %}
0
-