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

{% block content %}
<div class="back">
    <a href="/"><p class="back_text" style="color: #ffffff">Назад</p></a>
</div>
<div class="register">
    <h1 class="header_title">Регистрация</h1>
    <form action="" method="POST" enctype="multipart/form-data">
        <div class="register_form">
            {{ form.hidden_tag() }}
            {{ form.csrf_token }}
            <div>
                <label class="form-label">{{ form.name.label }}</label>
                {{ form.name(class="form-control", type="text") }}
                {% for error in form.name.errors %}
                <div class="alert alert-danger" role="alert">
                    {{ error }}
                </div>
                {% endfor %}
            </div>
            <div>
                <label class="form-label">{{ form.surname.label }}</label>
                {{ form.surname(class="form-control", type="text") }}
                {% for error in form.surname.errors %}
                <div class="alert alert-danger" role="alert">
                    {{ error }}
                </div>
                {% endfor %}
            </div>
            <div>
                <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>
                <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>
                <label class="form-label">{{ form.password2.label }}</label>
                {{ form.password2(class="form-control", type="password") }}
                {% for error in form.password2.errors %}
                <div class="alert alert-danger" role="alert">
                    {{ error }}
                </div>
                {% endfor %}
            </div>
            <div>
                <label class="form-label">{{ form.login.label }}</label>
                {{ form.login(class="form-control", type="text") }}
                {% for error in form.login.errors %}
                <div class="alert alert-danger" role="alert">
                    {{ error }}
                </div>
                {% endfor %}
            </div>
            <div class="form_buttons">
                <p>{{ form.submit(type="submit", class="btn btn-primary", style="background-color:#38aaff") }}</p>
                {% if message != '' %}
                <div class="alert alert-danger" role="alert">{{ message }}</div>
                {% endif %}
            </div>
        </div>
    </form>
</div>
{% endblock %}