{% extends "base.html" %}
{% load crispy_forms_filters %}

{% load i18n %}
{% load account %}

{% block title %}{% trans 'Password Reset' %}{% endblock %}

{% block content %}

    <div class="row">
        <div class="col-12" style="text-align: center">
            <h3>{% trans "Password Reset" %}</h3>
            {% if user.is_authenticated %}
                {% include "account/snippets/already_logged_in.html" %}
            {% endif %}
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12 col-lg-6 col-md-6 offset-lg-3 offset-md-3">
            <hr>
            {% if EMAIL_ENABLED %}
                <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>

                <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
                    {% csrf_token %}
                    {{ form | crispy }}
                    <input type="submit" class="btn btn-warning float-right" value="{% trans 'Reset My Password' %}"/>
                </form>
            {% else %}
                <p>{% trans 'Password reset is disabled on this instance.' %}</p>
            {% endif %}
        </div>
    </div>


{% endblock %}