1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Use cards for registration templates

This commit is contained in:
Alexandre Iooss 2020-08-21 17:52:48 +02:00
parent 8c46321c95
commit 5c3451bda7
3 changed files with 74 additions and 55 deletions

View File

@ -3,8 +3,6 @@
SPDX-License-Identifier: GPL-2.0-or-later
{% endcomment %}
{% load i18n crispy_forms_tags static %}
{# Change page title without displaying it in header #}
{% block title %}{% trans "Log in" %}{% endblock %}
{% block contenttitle %}{% endblock %}
@ -13,7 +11,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
{% endblock %}
{% block content %}
<main class="card bg-light border-dark mx-auto" style="max-width: 30rem;">
<div class="card bg-light mx-auto" style="max-width: 30rem;">
<h3 class="card-header text-center">
{% trans "Log in" %}
</h3>
@ -39,8 +37,9 @@ SPDX-License-Identifier: GPL-2.0-or-later
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
{{ form | crispy }}
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary btn-block btn-lg">
<a href="{% url 'password_reset' %}" class="badge badge-light">{% trans 'Forgotten your password or username?' %}</a>
<a href="{% url 'password_reset' %}"
class="badge badge-light">{% trans 'Forgotten your password or username?' %}</a>
</form>
</div>
</main>
</div>
{% endblock %}

View File

@ -3,11 +3,21 @@
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n crispy_forms_tags %}
{% block contenttitle %}{% endblock %}
{% block content %}
<div class="card bg-light">
<h3 class="card-header text-center">
{% trans "Password reset" %}
</h3>
<div class="card-body">
<p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
<form method="post">{% csrf_token %}
<form method="post">
{% csrf_token %}
{{ form | crispy }}
<input class="btn btn-primary" type="submit" value="{% trans 'Reset my password' %}">
</form>
</div>
</div>
{% endblock %}

View File

@ -1,15 +1,23 @@
<!-- templates/signup.html -->
{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% load i18n %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n crispy_forms_tags %}
{% block title %}{% trans "Sign up" %}{% endblock %}
{# Use a fixed-width container #}
{% block containertype %}container{% endblock %}
{% block contenttitle %}{% endblock %}
{% block content %}
<div class="card bg-light">
<h3 class="card-header text-center">
{% trans "Sign up" %}
</h3>
<div class="card-body">
<div class="alert alert-warning">
{% blocktrans %}If you already signed up, your registration is taken into account. The BDE must validate your account before your can log in. You have to go to the Kfet and pay the registration fee. You must also validate your email address by following the link you received.{% endblocktrans %}
{% blocktrans trimmed %}
If you already signed up, your registration is taken into account. The BDE must validate
your account before your can log in. You have to go to the Kfet and pay the registration fee. You must also
validate your email address by following the link you received.
{% endblocktrans %}
</div>
<form method="post">
@ -20,4 +28,6 @@
{% trans "Sign up" %}
</button>
</form>
</div>
</div>
{% endblock %}