{% extends 'preauth/base.html' %}
{% load account %}

{% block preauth_content %}
    {% if user.is_authenticated %}
    {% include "account/snippets/already_logged_in.html" %}
    {% endif %}
    <div class="xsd-preauth-content xsd-preauth-password-reset">
        <h2>Forgotten password</h2>
        <p>Forgotten your password? Enter your e-mail address below, and we'll send you an email allowing you to reset it.</p>

        <div class="xsd-preauth-form">
        <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
            {% csrf_token %}
            {{ form.email.errors }}
            <label>
                <input id="id_email"
                       class="form-control"
                       name="email"
                       size="30"
                       type="email"
                       placeholder="Email address">
            </label>
            <div class="xsd-preauth-form__controls">
                <button type="submit" class="btn btn-primary">
                    Reset Password
                </button>
            </div>
        </form>
        </div>

    </div>
{% endblock %}
