{% extends "base.html" %}
{% block content %}

    <div class="card">

        <h2>Create Access</h2>

        <p class="small">
            Enter your email to receive a secure link and set your password.
        </p>

        <form method="post">

            <input
                    type="email"
                    name="email"
                    placeholder="your@email.com"
                    required
            />

            <br><br>

            <input
                    type="text"
                    name="name"
                    placeholder="name (optional)"
            />

            <br><br>

            <button type="submit">
                Send password link
            </button>

        </form>

        <hr>

        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                {% for cat, msg in messages %}
                    <div class="info-box">
                        {{ msg }}
                    </div>
                {% endfor %}
            {% endif %}
        {% endwith %}

    </div>

{% endblock %}