Projet

Général

Profil

0001-templates-add-blocks-for-easier-reuse-of-oauth2-temp.patch

Frédéric Péters, 30 mars 2018 13:48

Télécharger (2,01 ko)

Voir les différences:

Subject: [PATCH] templates: add blocks for easier reuse of oauth2 templates
 (#22923)

 fargo/templates/fargo/oauth2/authorize.html | 4 ++++
 fargo/templates/fargo/oauth2/confirm.html   | 6 ++++++
 2 files changed, 10 insertions(+)
fargo/templates/fargo/oauth2/authorize.html
3 3

  
4 4
{% block content %}
5 5
<div id="fargo-oauth2-authorize">
6
  {% block form-intro %}
7
  {% endblock %}
8
  {% block form %}
6 9
  <form method="post" enctype="multipart/form-data">
7 10
    {% csrf_token %}
8 11
    {{ form.as_p  }}
......
11 14
      <button name="cancel">{% trans "Cancel" %}</button>
12 15
    </div>
13 16
  </form>
17
  {% endblock %}
14 18
</div>
15 19
{% endblock %}
fargo/templates/fargo/oauth2/confirm.html
4 4
{% block content %}
5 5
<div id="fargo-oauth2-confirm">
6 6
  {% if error_message %}
7
    {% block error-message %}
7 8
    <p>{% trans error_message %}</p>
8 9
    <a href="{{ redirect_uri }}">{% trans "Continue to your client url" %}</a>
10
    {% endblock %}
9 11
  {% else %}
12
    {% block form-intro %}
10 13
      <p>{% blocktrans %}
11 14
        Do you accept to add <em class="filename">{{ filename }}</em> to your portfolio?
12 15
      {% endblocktrans %}</p>
16
    {% endblock %}
17
    {% block form %}
13 18
    <form id="send-file" method="post" enctype="multipart/form-data">
14 19
      {% csrf_token %}
15 20
      <div class="buttons">
......
17 22
        <button name="cancel">{% trans "Cancel" %}</button>
18 23
      </div>
19 24
    </form>
25
    {% endblock %}
20 26
  {% endif %}
21 27
</div>
22 28
{% endblock %}
23
-