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

{% block content %}

<div class="row">
    <div class="large-12 columns">

    {% if validlink %}

    <h2>{% trans 'Enter new password' %}</h2>

<!-- <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> -->



    {% if form.errors %}
    <div class="alert-box alert">
        {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
    </div>
    {% endif %}

    <form action="" method="post">{% csrf_token %}
        <label {% if form.new_password1.errors %}class="error"{% endif %}>{% trans 'Password' %}
            {{ form.new_password1 }}
        </label>
        {% if form.new_password1.errors %}
            <span class="error">{% for error in form.new_password1.errors %}{{ error|escape }}{% endfor %}</span>
        {% endif %}

        <label {% if form.new_password2.errors %}class="error"{% endif %}>{% trans 'Password (again)' %}
            {{ form.new_password2 }}
        </label>
        {% if form.new_password2.errors %}
            <span class="error">{% for error in form.new_password2.errors %}{{ error|escape }}{% endfor %}</span>
        {% endif %}

        <input type="submit" value="{% trans 'Change my password' %}" class="button radius" />
    </form>

    {% else %}

    <h2>{% trans 'Password reset unsuccessful' %}</h2>

    <p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>

    {% endif %}
    </div>
</div>

{% endblock %}
