{% extends 'multimail/base.html' %}

{% block main %}

    <div class="container" style="height:100vh;">
        <div class="row h-100 justify-content-center align-items-center">
            <div class="card col-6 bg-dark">
                <article class="card-body">
                    <h4 class="card-title text-center mb-4 mt-1">Sign in</h4>
                    <hr>
                    {% if form.non_field_errors %}
                        <div class="alert alert-danger" role="alert">
                            <ul>
                                {% for error in form.non_field_errors %}
                                    <li>{{ error|escape }}</li>
                                {% endfor %}
                            </ul>
                        </div>
                    {% endif %}
                    <form method="POST">{% csrf_token %}
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"> <i class="fa fa-user"></i> </span>
                                </div>
                                <input id="{{ form.username.id_for_label }}" name="{{ form.username.html_name }}"
                                       class="form-control" placeholder="Email or login" type="text" requird>
                            </div> <!-- input-group.//-->
                            {% if form.username.errors %}
                                <p class="text-danger text-center">
                                    {% for error in form.username.errors %}
                                        {{ error|escape }}<br>
                                    {% endfor %}
                                </p>
                            {% endif %}
                        </div> <!-- form-group// -->
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <span class="input-group-text"> <i class="fa fa-lock"></i> </span>
                                </div>
                                <input id="{{ form.password.id_for_label }}" name="{{ form.password.html_name }}"
                                       class="form-control" placeholder="******" type="password" required>
                            </div> <!-- input-group.// -->
                            {% if form.password.errors %}
                                <p class="text-danger text-center">
                                    {% for error in form.password.errors %}
                                        {{ error|escape }}<br>
                                    {% endfor %}
                                </p>
                            {% endif %}
                        </div> <!-- form-group// -->
                        <div class="form-group">
                            <button type="submit" class="btn btn-primary btn-block"> Login</button>
                        </div> <!-- form-group// -->
                        <!--p class="text-center"><a href="#" class="btn">Forgot password?</a></p-->
                    </form>
                </article>
            </div>
        </div>
    </div>

{% endblock %}