svthalia/concrexit

View on GitHub
website/templates/registration/password_reset_form.html

Summary

Maintainability
Test Coverage
{% extends "small_page.html" %}
{% load i18n alert %}

{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}

{% block title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}

{% block page_title %}{% trans "Forgot password" %}{% endblock %}

{% block page_content %}
    {% for error in form.errors.items %}
        {% for message in error.1 %}
            {% alert 'danger' message dismissible=True %}
        {% endfor %}
    {% endfor %}
    <div class="row">
        <p class="col-12">{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
        <form method="post" action="{% url 'password_reset' %}" class="col-12">
            {% csrf_token %}
            <div class="form-row">
                <input name="{{ form.email.name }}" autofocus class="form-control"
                       placeholder="{% trans "Email address" %}">
            </div>
            <div class="form-row">
                <input type="submit" value="{% trans 'Reset my password' %}"
                       class="btn btn-primary float-end"/>
            </div>
        </form>
    </div>
{% endblock %}