{% extends "base.html" %}

{% load i18n account widget_tweaks %}


{% block content %}

    {% if form.errors %}
        <div class="container alert alert-danger">
            {{ form.errors.as_text }}
        </div>
    {% endif %}

    <div class="container">
        <div class="row">
            <div class="col-xs-12">
                <h1>{% trans "Password Reset" %}</h1>

                {% if user.is_authenticated %}
                    {% include "account/snippets/already_logged_in.html" %}
                {% endif %}

                <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 %}

                    <div class="form-group {% if form.email.errors %}has-error{% endif %}">
                        <label for="{{ form.email.auto_id }}">
                            {{ form.email.label }} <span>*</span>
                        </label>
                        {{ form.email|add_class:"form-control unicase-form-control text-input" }}
                    </div>

                    <input type="submit" class="btn btn-success" value="{% trans 'Reset My Password' %}" />
                </form>

                <p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
            </div>
        </div>
    </div>
{% endblock %}
