{% extends 'base.html' %}
{% load i18n %}
{% load form_as_div %}

{% block content %}
{% if not validlink %}
<div class="alert alert-danger">
    {% url 'password_reset' as reset_url %}
    {% blocktrans %}
    This password reset link has already been used. In case you forgot your password again,
    <a href="{{ reset_url }}">request a new reset link</a>.
    {% endblocktrans %}
</div>
{% endif %}

<div class="page-header">
    <h1>{% block title %}{% trans 'Reset Password' %}{% endblock %}</h1>
</div>


{% if not validlink %}
<p class="lead">
    {% blocktrans %}
    Return to <a href="{{ HOME_URL }}">home page</a>…
    {% endblocktrans %}
</p>
{% else %}
<form method="post">
    {% csrf_token %}

    {{ form|as_div }}

    <button type="submit" class="btn btn-primary">{% trans 'Save' %}</button>
</form>
{% endif %}
{% endblock %}
