From 1524880eec5a55b4b9e1995351f099f20ac36f4a Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 8 Jul 2020 14:17:29 +0200 Subject: [PATCH] core: add generic login/base_full template for static login views --- passbook/core/templates/error/generic.html | 66 ++++------------ passbook/core/templates/login/base_full.html | 53 +++++++++++++ passbook/core/templates/login/denied.html | 76 +++++-------------- passbook/flows/templates/flows/shell.html | 55 +++----------- .../providers/saml/autosubmit_form.html | 2 +- .../sources/saml/templates/saml/sp/login.html | 15 ++-- 6 files changed, 104 insertions(+), 163 deletions(-) create mode 100644 passbook/core/templates/login/base_full.html diff --git a/passbook/core/templates/error/generic.html b/passbook/core/templates/error/generic.html index c25f9a061..2e61ea09e 100644 --- a/passbook/core/templates/error/generic.html +++ b/passbook/core/templates/error/generic.html @@ -1,58 +1,20 @@ -{% extends 'base/skeleton.html' %} +{% extends 'login/base_full.html' %} {% load static %} {% load i18n %} {% load passbook_utils %} -{% block body %} -
- - - - - - - - - - - -
-
- -
+{% block title %} +{% trans 'Bad Request' %} +{% endblock %} + +{% block card %} +
+ {% if message %} +

{% trans message %}

+ {% endif %} + {% if 'back' in request.GET %} + {% trans 'Back' %} + {% endif %} +
{% endblock %} diff --git a/passbook/core/templates/login/base_full.html b/passbook/core/templates/login/base_full.html new file mode 100644 index 000000000..6d93eb632 --- /dev/null +++ b/passbook/core/templates/login/base_full.html @@ -0,0 +1,53 @@ +{% extends 'base/skeleton.html' %} + +{% load static %} +{% load i18n %} +{% load passbook_utils %} + +{% block body %} +
+ + + + + + + + + + + +
+
+ +
+{% endblock %} diff --git a/passbook/core/templates/login/denied.html b/passbook/core/templates/login/denied.html index 2be7d36fa..4d8ac623a 100644 --- a/passbook/core/templates/login/denied.html +++ b/passbook/core/templates/login/denied.html @@ -1,63 +1,25 @@ -{% extends 'base/skeleton.html' %} +{% extends 'login/base_full.html' %} {% load static %} {% load i18n %} {% load passbook_utils %} -{% block body %} -
- - - - - - - - - - - -
-
- -
+{% block title %} +{% trans 'Permission denied' %} +{% endblock %} + +{% block card %} +
+ {% csrf_token %} + {% include 'partials/form.html' %} +
+

+ + {% trans 'Access denied' %} +

+
+ {% if 'back' in request.GET %} + {% trans 'Back' %} + {% endif %} +
{% endblock %} diff --git a/passbook/flows/templates/flows/shell.html b/passbook/flows/templates/flows/shell.html index 6aa9e855e..20422c157 100644 --- a/passbook/flows/templates/flows/shell.html +++ b/passbook/flows/templates/flows/shell.html @@ -1,4 +1,4 @@ -{% extends 'base/skeleton.html' %} +{% extends 'login/base_full.html' %} {% load static %} {% load i18n %} @@ -20,51 +20,16 @@ {% endblock %} -{% block body %} -
- - - - - - - - - - - -
- -
- +