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

{% block title %}Login{% endblock %}

{% block content %}
    <section class="section-login">
        <div class="box">
            <div class="text">
                <div class="title">Login</div>
                {% if error %}
                    <div class="flashbang flashbang-error">{{ error.message }}</div>
                {% endif %}

                <form action="{{ path("fos_user_security_check") }}" method="post">
                    <input type="text" name="_username" value="{{ last_username }}" placeholder="Username" />
                    <input type="password" name="_password" placeholder="Password" />

                    <div class="actions">
                        <input class="button" type="submit" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" />
                        <a class="button" href="{{ path('fos_user_registration_register') }}">Register</a>
                    </div>

                    <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
                </form>
            </div>
            <div class="illustration">
                <img src="{{ asset('assets/img/illustration-login.svg') }}" alt="Login Illustration" />
            </div>
        </div>
    </section>
{% endblock content %}

{% block styles %}
    <link rel="stylesheet" href="{{ asset('assets/css/login.css') }}" />
{% endblock %}