From f0d98aacb08eef52e0b008aa3c90db9923817dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 30 Mar 2018 13:47:22 +0200 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(+) diff --git a/fargo/templates/fargo/oauth2/authorize.html b/fargo/templates/fargo/oauth2/authorize.html index b08dfaf..319ca02 100644 --- a/fargo/templates/fargo/oauth2/authorize.html +++ b/fargo/templates/fargo/oauth2/authorize.html @@ -3,6 +3,9 @@ {% block content %}
+ {% block form-intro %} + {% endblock %} + {% block form %}
{% csrf_token %} {{ form.as_p }} @@ -11,5 +14,6 @@
+ {% endblock %} {% endblock %} diff --git a/fargo/templates/fargo/oauth2/confirm.html b/fargo/templates/fargo/oauth2/confirm.html index f5a403a..0156acd 100644 --- a/fargo/templates/fargo/oauth2/confirm.html +++ b/fargo/templates/fargo/oauth2/confirm.html @@ -4,12 +4,17 @@ {% block content %}
{% if error_message %} + {% block error-message %}

{% trans error_message %}

{% trans "Continue to your client url" %} + {% endblock %} {% else %} + {% block form-intro %}

{% blocktrans %} Do you accept to add {{ filename }} to your portfolio? {% endblocktrans %}

+ {% endblock %} + {% block form %}
{% csrf_token %}
@@ -17,6 +22,7 @@
+ {% endblock %} {% endif %}
{% endblock %} -- 2.16.3