{% extends "base.html" %}

{% load bootstrap4 %}

{% block head_content %}
    <meta name="robots" content="noindex">
    {{ block.super }}
{% endblock head_content %}

{% block title %}Login{% endblock title %}

{% block main_content %}
    <div class="container" role="dialog">
        <div class="row">
            <div class="col-8 col-md-6 col-lg-4 mx-auto my-3">
                <h2 class="text-center">Welcome back!</h2>

                <form method="post" action="{% url 'login' %}" class="col-10 my-3 mx-auto">
                    {% csrf_token %}

                    {% if next %}
                        <input type="hidden" name="next" value="{{ next }}" />
                    {% endif %}

                    {% bootstrap_form form %}
                    <p>
                    By using this system, you agree to comply with
                    <a href="https://www.loc.gov/legal/" target="_blank">the Library's
                    security requirements</a>
                    </p>
                    {% buttons %}
                        <button type="submit" class="btn btn-primary">
                            Login
                        </button>
                    {% endbuttons %}
                </form>
            </div>
        </div>
        <div class="row">
            <div class="col-8 col-md-6 col-lg-4 mx-auto my-3 text-center">
                    <a href="{% url 'password_reset' %}">Forgot my password</a>
            </div>
        </div>
    </div>
{% endblock main_content %}
