Projet

Général

Profil

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

Serghei Mihai (congés, retour 15/05), 28 avril 2020 14:24

Télécharger (4,34 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 +++++--------------
 .../login_password_registration_form.html     |  6 +++
 .../registration/registration_form.html       | 28 --------------
 4 files changed, 21 insertions(+), 58 deletions(-)
 create mode 100644 templates/variants/grenoble-metropole-2019/authentic2/login_password_registration_form.html
 delete mode 100644 templates/variants/grenoble-metropole-2019/registration/registration_form.html
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

  
templates/variants/grenoble-metropole-2019/authentic2/login_password_registration_form.html
1
{% extends "authentic2/login_password_registration_form.html" %}
2

  
3
{% block registration-password-form-pre %}
4
<h2>CRÉEZ VOTRE COMPTE</h2>
5
{% endblock %}
6

  
templates/variants/grenoble-metropole-2019/registration/registration_form.html
1
{% extends 'registration/registration_form.html' %}
2

  
3
{% block placeholder-content %}
4

  
5
<div id="frontend-registration-email" class="a2-block">
6
<h2>CRÉEZ VOTRE COMPTE</h2>
7

  
8
<form method="post">
9
  {% csrf_token %}
10
  {{ form.as_p }}
11

  
12
  <button class="submit-button">VALIDER</button>
13
</form>
14
</div>
15

  
16
{% for id, block in frontends.items %}
17
  {% if id != "password" %}
18
  <div id="frontend-registration-{{ id }}" class="a2-block">
19
    <h2>{{ block.name }}</h2>
20

  
21
    <div>
22
      {{ block.content|safe }}
23
    </div>
24
  </div>
25
  {% endif %}
26
{% endfor %}
27

  
28
{% endblock %}
29
-