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

{% block title %}{{ title }}{% endblock %}
{% block content_title %}<h1>{{ title }}</h1>{% endblock %}

{% block main_content %}
<div class="container py-3">
    <div class="row">
        <div class="col-md-8 mx-auto my-3 p-3">
            {% if validlink %}
                <form method="post" class="col-10 mx-auto">
                    {% csrf_token %}

                    {% bootstrap_form form %}

                    {% buttons %}
                        <button type="submit" class="btn btn-primary">
                            Change my password
                        </button>
                    {% endbuttons %}
                </form>
            {% else %}
                <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>
</div>
{% endblock %}

{% block body_scripts %}
    {{ block.super }}
    <script src="{% static 'js/password-validation.js' %}"></script>
{% endblock body_scripts %}
