0001-auth-let-LoginPassowrd-frontend-handle-registration-.patch
src/authentic2/auth_frontends.py | ||
---|---|---|
44 | 44 | |
45 | 45 |
def profile(self, request, *args, **kwargs): |
46 | 46 |
return views.login_password_profile(request, *args, **kwargs) |
47 | ||
48 |
def registration(self, request, *args, **kwargs): |
|
49 |
context = kwargs.get('context', {}) |
|
50 |
return render(request, 'registration/login_password_registration_form.html', context) |
src/authentic2/templates/registration/login_password_registration_form.html | ||
---|---|---|
1 |
{% load i18n %} |
|
2 | ||
3 |
<form enctype="multipart/form-data" method="post"> |
|
4 |
{% csrf_token %} |
|
5 |
{{ form.as_p }} |
|
6 |
<button class="submit-button">{% trans 'Submit' %}</button> |
|
7 |
</form> |
src/authentic2/templates/registration/registration_form.html | ||
---|---|---|
12 | 12 |
{% endblock %} |
13 | 13 | |
14 | 14 |
{% block content %} |
15 | ||
16 |
<h2>{{ view.title }}</h2> |
|
17 | ||
18 |
<form enctype="multipart/form-data" method="post"> |
|
19 | ||
20 |
{% csrf_token %} |
|
21 |
{{ form.as_p }} |
|
22 |
<button class="submit-button">{% trans 'Submit' %}</button> |
|
23 |
</form> |
|
24 | ||
25 | 15 |
{% for id, block in frontends.items %} |
26 | 16 |
<div class="registration_frontend"> |
27 | 17 |
<h2>{{ block.name }}</h2> |
28 |
- |