core: cleanup templates, add template for backend authentication

This commit is contained in:
Jens Langhammer 2018-12-14 13:50:58 +01:00
parent 195aec7e33
commit c4cd602fcb
4 changed files with 11 additions and 0 deletions

View File

@ -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"""

View File

@ -0,0 +1,8 @@
{% extends 'login/form.html' %}
{% load i18n %}
{% block above_form %}
<span class="pficon pficon-unlocked"></span>
{% trans "This is a text" %}
{% endblock %}

View File

@ -10,6 +10,8 @@
{% include 'partials/messages.html' %}
<form method="POST">
{% csrf_token %}
{% block above_form %}
{% endblock %}
{% include 'partials/form_login.html' %}
<button type="submit" class="btn btn-primary btn-block btn-lg">{% trans primary_action %}</button>
</form>