{% extends "site_base.html" %}

{% load i18n %}
{% load bootstrap_tags %}
{% load account_tags %}

{% block head_title %}{% trans "Password Reset" %}{% endblock %}

{% block body %}
    <h1>{% trans "Password Reset" %}</h1>
    
    {% if user.is_authenticated %}
        <p><span class="warning">{% trans "Note" %}</span>: {% user_display user as user_display %}{% blocktrans %}you are already logged in as {{ user_display }}.{% endblocktrans %}</p>
    {% endif %}
    
    <p>{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}</p>
    
    <form method="POST" action="">
        {% csrf_token %}
        <fieldset >
            {{ password_reset_form|as_bootstrap }}
        </fieldset>
        <div class="actions">
            <button type="submit" class="btn primary">{% trans "Reset my password" %}</button>
        </div>
    </form>
    
    <p>{% blocktrans %}If you have any trouble resetting your password, contact us at <a href="mailto:{{ CONTACT_EMAIL }}">{{ CONTACT_EMAIL }}</a>.{% endblocktrans %}</p>
{% endblock %}

{% block extra_body %}
    <script>
        $("#id_email").focus();
    </script>
{% endblock %}
