Login and registration #10
2 changed files with 17 additions and 5 deletions
|
@ -41,11 +41,9 @@
|
||||||
id="login-form"
|
id="login-form"
|
||||||
class="form form-vertical"
|
class="form form-vertical"
|
||||||
style="max-width: 400px">
|
style="max-width: 400px">
|
||||||
<form method="post" action="{% url 'account_login' %}">
|
{% url 'account_login' as form_action %}
|
||||||
{% csrf_token %}
|
{% translate "Sign In" as form_submit_label %}
|
||||||
{{ form }}
|
{% include "includes/form.html" %}
|
||||||
<button class="btn btn-primary" type="submit">{% translate "Sign In" %}</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
14
src/servala/frontend/templates/includes/form.html
Normal file
14
src/servala/frontend/templates/includes/form.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{% load i18n %}
|
||||||
|
<form class="form form-vertical"
|
||||||
|
method="post"
|
||||||
|
{% if form_action %}action="{{ form_action }}"{% endif %}>
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form }}
|
||||||
|
<button class="btn btn-primary" type="submit">
|
||||||
|
{% if form_submit_label %}
|
||||||
|
{{ form_submit_label }}
|
||||||
|
{% else %}
|
||||||
|
{% translate "Save" %}
|
||||||
|
{% endif %}
|
||||||
|
</button>
|
||||||
|
</form>
|
Loading…
Add table
Add a link
Reference in a new issue