{% trans_default_domain 'FOSUserBundle' %}
{% set actionUrl=path("fos_user_security_check") %}
{% if app.request.attributes.get('_route') == 'fos_oauth_server_login' %}
{% set actionUrl=path("fos_oauth_server_check") %}
{% endif %}
<div class="container py-5">
<div class="row my-5">
<div class="col-xl-4 col-lg-4 col-md-6 col-8 mx-auto">
<form action="{{ actionUrl }}" method="post">
{% if csrf_token %}
<input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
{% endif %}
<div class="text-center mb-4">
<img class="mb-4" src="{{ asset('img/logo.png') }}" alt="Logo Ventour" width="220">
</div>
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error.messageKey|trans(error.messageData, 'security') }}
</div>
{% endif %}
<input type="text"
id="username" name="_username" class="form-control my-2"
placeholder="{% trans %}security.login.username{% endtrans %}" value="{{ last_username }}" autocomplete="username"
required autofocus>
<input type="password"
id="password" name="_password" class="form-control my-2"
placeholder="{% trans %}security.login.password{% endtrans %}" autocomplete="current-password"
required>
<div class="checkbox my-3">
<label>
<input type="checkbox" value="on" id="remember_me" name="_remember_me"> {% trans %}security.login.remember_me{% endtrans %}
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">
{% trans %}security.login.submit{% endtrans %}
</button>
<div class="w-100 mt-3">
<p class="text-center text-secondary">
© GVAM {{ "now"|date("Y") }}
</p>
</div>
</form>
</div>
</div>
</div>