{% extends "petition/base.html" %}
{% load i18n %}

{% block container_type %}
<div class="container">
{% endblock container_type %}

{% block main_grid %}
<div class="row justify-content-center">
    <div class="col-*">
        {% if form.errors %}
        <p>Your username and password didn't match. Please try again.</p>
        {% endif %}

        {% if next %}
            {% if user.is_authenticated %}
            <p>Your account doesn't have access to this page. To proceed,
            please login with an account that has access.</p>
            {% else %}
            <p>Please login to see this page.</p>
            {% endif %}
        {% endif %}

        <form method="post" action="{% url 'login' %}">
        {% csrf_token %}
        <table>
        <tr>
            <td>{{ form.username.label_tag }}</td>
            <td>{{ form.username }}</td>
        </tr>
        <tr>
            <td>{{ form.password.label_tag }}</td>
            <td>{{ form.password }}</td>
        </tr>
        </table>
        <button type="submit" class="btn btn-primary">{% trans "Login" %}</button>
        <input type="hidden" name="next" value="{{ next }}" />
        </form>
        <br/>
        <p>{% trans "No account?" %}
        <a href="{% url "register" %}">{% trans "Register!" %}</a></p>
    </div>
</div>
{% endblock main_grid %}

{% extends "petition/base.html" %}
{% load i18n %}

{% block container_type %}
<div class="container">
{% endblock container_type %}

{% block main_grid %}
<div class="row justify-content-center">
    <div class="col-* text-center">
        {% if form.errors %}
        <p>Your username and password didn't match. Please try again.</p>
        {% endif %}

        {% if next %}
            {% if user.is_authenticated %}
            <p>Your account doesn't have access to this page. To proceed,
            please login with an account that has access.</p>
            {% else %}
            <p>Please login to see this page.</p>
            {% endif %}
        {% endif %}

        <form method="post" action="{% url 'login' %}">
        {% csrf_token %}
        <table>
        <tr>
            <td>{{ form.username.label_tag }}</td>
            <td>{{ form.username }}</td>
        </tr>
        <tr>
            <td>{{ form.password.label_tag }}</td>
            <td>{{ form.password }}</td>
        </tr>
        </table>
        <button type="submit" class="btn btn-primary">{% trans "Login" %}</button>
        <input type="hidden" name="next" value="{{ next }}" />
        </form>
        <br/>
        <p>{% trans "No account?" %}
        <a href="{% url "register" %}">{% trans "Register!" %}</a></p>
        <p><a href="{% url "password_reset" %}">{% trans "I forgot my password!" %}</a></p>
    </div>
</div>
{% endblock main_grid %}

Allow user to change his/her forgotten password
Allow user to change his/her forgotten password
