{% extends 'layout.html' %}
{% load i18n %}

{% block title %}{% trans 'Enter a new password' %} | {{ block.super }}{% endblock %}

{% block breadcrumbs %}
    <ul class="breadcrumb">
        <li>
            <a href="{{ homepage_url }}">{% trans 'Home' %}</a>
        </li>
        <li>
            <a href="{% url 'password-reset' %}">{% trans 'Password reset' %}</a>
        </li>
        <li class="active">{% trans 'Enter a new password' %}</li>
    </ul>
{% endblock %}

{% block headertext %}{% trans "Enter a new password" %}{% endblock %}

{% block content %}
    {% if validlink %}
        <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
        <form id="password_reset_form" action="" method="post">
            {% csrf_token %}
            {% include 'partials/form_fields.html' %}
            <div class="form-group form-actions">
                <button class="btn btn-primary btn-lg" type="submit" data-loading-text="{% trans 'Changing...' %}">{% trans 'Change my password' %}</button>
            </div>
        </form>
    {% else %}
        <h1>{% trans 'Password reset unsuccessful' %}</h1>
        <p>{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</p>
    {% endif %}

{% endblock %}
