<link rel="stylesheet" href="../static/css/register.css">
{% extends "base.html" %}

{% block content %}
<div class="divlog" id="divlog">
    <h1 class="zag_auth">Авторизация</h1>
    <form class="row g-2" action="" method="post">
        {{ form.hidden_tag() }}
        <div class="col-md-4">
            <label class="form-label">{{ form.email.label }}</label>
            {{ form.email(class="form-control", type="email") }}
            {% for error in form.email.errors %}
            <div class="alert alert-danger" role="alert">
                {{ error }}
            </div>
            {% endfor %}
        </div>
        <div class="col-md-4">
            <label class="form-label">{{ form.password.label }}</label>
            {{ form.password(class="form-control", type="password") }}
            {% for error in form.password.errors %}
            <div class="alert alert-danger" role="alert">
                {{ error }}
            </div>
            {% endfor %}
        </div>
        <div class="col-md-6">
            <div class="box">{{ form.remember_me(class="form-check-input")}} {{ form.remember_me.label }}<br></div>
            {% for error in form.remember_me.errors %}
            <div class="alert alert-danger" role="alert">
                {{ error }}
            </div>
            {% endfor %}
        </div>
        <div class="col-sm-10" id="buttons">{{ form.submit(type="submit", class="btn btn-primary", id="but_log1") }}
            <a class="btn btn-primary" id="but_log3" type="submit"
               href="/register"><strong>Регистрация</strong></a>
            <a class="btn btn-primary" type="submit" id="but_log2" href="/recovery"><strong>Забыли
                пароль</strong></a>
        </div>
        {% if message != '' %}
        <div class="alert alert-danger" role="alert">{{ message }}</div>
        {% endif %}
    </form>
</div>
{% endblock %}