{% extends "BackendBaseBundle:Layout:securityLayout.html.twig" %}

{% block content %}
    <div class="middle-box text-center animated fadeInDown">
        <div>
            <div>
                <h1 class="logo-name">{{ app.request.attributes.get('slug') }}</h1>
            </div>
            <h3>{{ "message.backend.login.welcome"|trans({}, "forms") }}</h3>
            <p>{{ "message.backend.login.info"|trans({}, "forms") }}</p>
            <form action="{{ path("@BackendLoginCheck", {slug: app.request.attributes.get('slug')}) }}" role="form" class="m-t" method="post">
                {%- if error|length > 0 -%}
                    <div class="alert alert-danger">
                        <ul class="list-unstyled">
                            <li><span class="fa fa-warning"></span> {{ error.message|trans({}, "forms") }}</li>
                        </ul>
                    </div>
                {%- endif -%}
                <div class="form-group">
                    <input type="text" required="" placeholder="Username / Email" class="form-control" name="_username" value="{{ last_username }}">
                </div>
                <div class="form-group">
                    <input type="password" required="" placeholder="Password" class="form-control" name="_password">
                </div>
                <button class="btn btn-primary block full-width m-b" type="submit">{{ "message.backend.login.backend"|trans({}, "forms") }}</button>
                <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />
                <a href="{{ path("@BackendForgetPassword", {slug: app.request.attributes.get('slug')}) }}" class="pull-right"><small>{{ "message.backend.login.forgetpassword"|trans({}, "forms") }}</small></a>
            </form>
        </div>
    </div>
{% endblock %}