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

{% block content %}
    {% if validlink %}
        <p>{% trans "Please enter your new password" %}</p>
        <form action="" method="post">
        {% csrf_token %}
            <table>
                <tr>
                    <td>{{ form.new_password1.errors }}
                        <label for="id_new_password1">{% trans "New password :" %}</label></td>
                    <td>{{ form.new_password1 }}</td>
                </tr>
                <tr>
                    <td>{{ form.new_password2.errors }}
                        <label for="id_new_password2">{% trans "Confirm password :" %}</label></td>
                    <td>{{ form.new_password2 }}</td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" value="Change my password" /></td>
                </tr>
            </table>
        </form>
    {% else %}
        <h1>{% trans "Password reset failed :" %}</h1>
        <p>{% trans "The reset password link wasn't valid. Maybe it has been already used. Please ask to reset password again" %}.</p>
    {% endif %}
{% endblock %}