templates: add django blocks around login/registration templates (#38262)

This commit is contained in:
Frédéric Péters 2019-12-06 13:58:28 +01:00
parent 94f4ec8c7d
commit 1b7803e4f2
5 changed files with 13 additions and 2 deletions

View File

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

View File

@ -1,6 +1,7 @@
{% load staticfiles %}
{% load i18n %}
{% block login %}
<link rel="stylesheet" type="text/css" href="{% static 'authentic2_auth_fc/css/fc.css' %}">
<div id="fc-button-wrapper">
<div id="fc-button">
@ -14,3 +15,4 @@
</div>
{% include "authentic2_auth_fc/explanation.html" %}
{% if popup %}<script src="{% static 'authentic2_auth_fc/js/fc.js' %}" type="text/javascript"></script>{% endif %}
{% endblock %}

View File

@ -1,6 +1,7 @@
{% load staticfiles %}
{% load i18n %}
{% block registration %}
<link rel="stylesheet" type="text/css" href="{% static 'authentic2_auth_fc/css/fc.css' %}"/>
<div id="fc-button-wrapper">
<div id="fc-button">
@ -14,3 +15,4 @@
</div>
{% include "authentic2_auth_fc/explanation.html" %}
{% if popup %}<script src="{% static 'authentic2_auth_fc/js/fc.js' %}" type="text/javascript"></script>{% endif %}
{% endblock %}

View File

@ -1,4 +1,6 @@
{% block login %}
<p id="oidc-p-{% firstof provider.slug provider.name|slugify %}">
<a id="oidc-a-{% firstof provider.slug provider.name|slugify %}"
href="{{ login_url }}">{{ provider.name }}</a>
</p>
{% endblock %}

View File

@ -1,7 +1,10 @@
{% load i18n %}<form method="post">
{% load i18n %}
{% block login %}
<form method="post">
<button class="submit-button" name="{{ submit_name }}">{% trans "Login" %}</button>
{% if cancel %}
<button class="cancel-button" name="cancel" formnovalidate>{% trans 'Cancel' %}</button>
{% endif %}
</form>
{% endblock %}