From c4cd602fcb43d956d8cc105bdc68a7c260fadb9d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 14 Dec 2018 13:50:58 +0100 Subject: [PATCH] core: cleanup templates, add template for backend authentication --- passbook/core/auth/backend_factor.py | 1 + passbook/core/templates/login/disabled.html | 0 passbook/core/templates/login/factors/backend.html | 8 ++++++++ passbook/core/templates/login/form.html | 2 ++ 4 files changed, 11 insertions(+) delete mode 100644 passbook/core/templates/login/disabled.html create mode 100644 passbook/core/templates/login/factors/backend.html diff --git a/passbook/core/auth/backend_factor.py b/passbook/core/auth/backend_factor.py index bb7c60ed1..56a383db1 100644 --- a/passbook/core/auth/backend_factor.py +++ b/passbook/core/auth/backend_factor.py @@ -16,6 +16,7 @@ class AuthenticationBackendFactor(FormView, AuthenticationFactor): """Authentication factor which authenticates against django's AuthBackend""" form_class = AuthenticationBackendFactorForm + template_name = 'login/factors/backend.html' def form_valid(self, form): """Authenticate against django's authentication backend""" diff --git a/passbook/core/templates/login/disabled.html b/passbook/core/templates/login/disabled.html deleted file mode 100644 index e69de29bb..000000000 diff --git a/passbook/core/templates/login/factors/backend.html b/passbook/core/templates/login/factors/backend.html new file mode 100644 index 000000000..699095a19 --- /dev/null +++ b/passbook/core/templates/login/factors/backend.html @@ -0,0 +1,8 @@ +{% extends 'login/form.html' %} + +{% load i18n %} + +{% block above_form %} + +{% trans "This is a text" %} +{% endblock %} diff --git a/passbook/core/templates/login/form.html b/passbook/core/templates/login/form.html index e88d5c272..b12c9ae41 100644 --- a/passbook/core/templates/login/form.html +++ b/passbook/core/templates/login/form.html @@ -10,6 +10,8 @@ {% include 'partials/messages.html' %}
{% csrf_token %} + {% block above_form %} + {% endblock %} {% include 'partials/form_login.html' %}