Use Django Crispy forms
This commit is contained in:
parent
3e64f02dea
commit
b9013c4eb3
7 changed files with 33 additions and 21 deletions
|
|
@ -2,13 +2,9 @@
|
|||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n static %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
{% block title %}{% trans "Log in" %}{% endblock %}
|
||||
|
||||
{% block extracss %}
|
||||
<link rel="stylesheet" href="{% static "registration/css/login.css" %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light mx-auto" style="max-width: 35rem;">
|
||||
<h3 class="card-header text-center">
|
||||
|
|
@ -33,8 +29,8 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||
{% endif %}
|
||||
|
||||
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary btn-block btn-lg">
|
||||
{{ form|crispy }}
|
||||
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary btn-lg mt-2">
|
||||
<a href="{% url 'password_reset' %}"
|
||||
class="badge bg-light text-dark">{% trans 'Forgotten your password or username?' %}</a>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue