auth: let LoginPassword frontend handle registration (#31218)

This commit is contained in:
Serghei Mihai 2019-02-01 12:14:46 +01:00 committed by Benjamin Dauvergne
parent 92c829dd3a
commit 696823919c
3 changed files with 11 additions and 7 deletions

View File

@ -61,3 +61,7 @@ class LoginPasswordAuthenticator(object):
def profile(self, request, *args, **kwargs):
return views.login_password_profile(request, *args, **kwargs)
def registration(self, request, *args, **kwargs):
context = kwargs.get('context', {})
return render(request, 'authentic2/login_password_registration_form.html', context)

View File

@ -0,0 +1,7 @@
{% load i18n %}
<form enctype="multipart/form-data" method="post">
{% csrf_token %}
{{ form.as_p }}
<button class="submit-button">{% trans 'Submit' %}</button>
</form>

View File

@ -9,13 +9,6 @@
<h2>{{ view.title }}</h2>
<form enctype="multipart/form-data" method="post">
{% csrf_token %}
{{ form.as_p }}
<button class="submit-button">{% trans 'Submit' %}</button>
</form>
{% for id, block in frontends.items %}
<div class="registration_frontend">
<h2>{{ block.name }}</h2>