{% extends 'base.html.twig' %}

{% block title %}Log in!{% endblock %}

{% block body %}

    {% for flashError in app.flashes('verify_email_error') %}
        <div class="alert alert-danger" role="alert">{{ flashError }}</div>
    {% endfor %}

    <form method="post">

        <div class="container">
            <div class="d-flex justify-content-center h-100">
                <div class="card-header">
                    <h3>Please Sign in</h3>
                </div>
                <div class="card">
                    <div class="card-body">

                        <div class="input-group form-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text"><i class="fas fa-user"></i></span>
                            </div>
                            <input type="text" value="{{ last_username }}" name="username" id="inputUsername"
                                   class="form-control" autocomplete="username" required autofocus>
                        </div>

                        <div class="input-group form-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text"><i class="fas fa-key"></i></span>
                            </div>
                            <input type="password" name="password" id="inputPassword" class="form-control"
                                   autocomplete="current-password" required>
                        </div>

                        {#
                        Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
                        See https://symfony.com/doc/current/security/remember_me.html

                        <div class="checkbox mb-3">
                            <label>
                                <input type="checkbox" name="_remember_me"> Remember me
                            </label>
                        </div>
                        #}

                        <button type="submit" class="submit-button">Sign In</button>
                        <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
                    </div>

                    <div class="card-footer">
                        <div class="d-flex justify-content-center links">
                            Don't have an account yet? &nbsp;<a href=" {{ path('app_register') }}">Register!</a>
                        </div>
                        <div class="d-flex justify-content-center">
                            <a href="{{ path('app_forgot_password_request') }}">Forgot your password?</a>
                        </div>
                        <!--
                        <div class="d-flex justify-content-center social_icon">
                            <span><i class="fab fa-apple"></i></span>
                            <span><i class="fab fa-facebook"></i></span>
                            <span><i class="fab fa-google-plus"></i></span>
                            <span><i class="fab fa-twitter"></i></span>
                        </div>
                        -->
                    </div>
                </div>
            </div>
        </div>

    </form>
{% endblock %}
