{% extends '@CadolesCore/base.html.twig' %}

{% block pagewrapper %}
    {{ form_start(form) }}
        <div class="col-md-4 col-md-offset-4">
            <div style="width: 400px;margin: auto;text-align: center;margin-top: 100px;">
                <a href="{{ path("cadoles_core_home") }}">
                <img id="logo" src="/{{ alias }}/{{ app.session.get('logo') }}">
                
                <h1>{{ app.session.get('appname') }}</h1>
                </a>
            </div>


            <div class="login-panel panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">Login</h3>
                </div>
                
                <div class="panel-body">
                    <fieldset>
                    <label for="username">Login</label>
                    {{ form_widget(form._username) }}

                    <label for="username">Password</label>
                    {{ form_widget(form._password) }}

                    {{ form_widget(form.submit) }}
                    </fieldset>
                </div>
            </div>    

            {% if error %}
                <div>{{ error }}</div>
            {% endif %}            
        </div>
    </form>
    {{ form_end(form) }}
{% endblock %}

{% block localjavascript %}
    $("#username").focus();
{% endblock %}
