Projet

Général

Profil

0001-misc-use-dedicated-template-for-email-registration-4.patch

Serghei Mihai (congés, retour 15/05), 27 avril 2020 19:07

Télécharger (2,59 ko)

Voir les différences:

Subject: [PATCH] misc: use dedicated template for email registration (#42138)

 .../login_password_registration_form.html     |  7 +++-
 templates/registration/registration_form.html | 38 +++++--------------
 2 files changed, 15 insertions(+), 30 deletions(-)
templates/authentic2/login_password_registration_form.html
2 2
{% load i18n %}
3 3

  
4 4
{% block registration %}
5
{% block registration-password-form-pre %}
6
<h2>{% trans "Registration" %}</h2>
5 7
<p>
6
Après validation de votre adresse électronique, il vous sera envoyé un courriel
7
pour ouvrir votre compte.
8
  Après validation de votre adresse électronique, il vous sera envoyé un courriel
9
  pour ouvrir votre compte.
8 10
</p>
11
{% endblock %}
9 12
{{ block.super }}
10 13
{% endblock %}
templates/registration/registration_form.html
13 13
<div id="registration-blocks" class="methods{{frontends.items|length}}">
14 14
{% block registration-top %}{% endblock %}
15 15

  
16
{% block registration-email %}
17
<div id="frontend-registration-email" class="a2-block">
18
{% block registration-email-form-pre %}
19
<h2>{% trans "Registration" %}</h2>
20

  
21
<p>
22
Après validation de votre adresse électronique, il vous sera envoyé un courriel
23
pour ouvrir votre compte.
24
</p>
25
{% endblock %}
26

  
27
<form method="post">
28
  {% csrf_token %}
29
  {{ form.as_p }}
30

  
31
  <button class="submit-button">{% trans 'Submit' %}</button>
32
</form>
33
</div>
34
{% endblock %}
35

  
36 16
{% block registration-other-methods %}
37 17
{% for id, block in frontends.items %}
38
  {% if id != "password" %}
39
  <div id="frontend-registration-{{ id }}" class="a2-block">
40
    <h2>{{ block.name }}</h2>
41

  
42
    <div>
43
      {{ block.content|safe }}
44
    </div>
18
   {% if id == "password" %}
19
      <div id="frontend-registration-email" class="a2-block">
20
       {{ block.content|safe }}
21
   {% else %}
22
      <div id="frontend-registration-{{ id }}" class="a2-block">
23
        <h2>{{ block.name }}</h2>
24
        <div>
25
          {{ block.content|safe }}
26
        </div>
27
   {% endif %}
45 28
  </div>
46
  {% endif %}
47 29
{% endfor %}
48 30
{% endblock %}
49 31

  
50
-