{% trans_default_domain 'FOSUserBundle' %}
{% if error is defined and error %}
    <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}

<form action="{{ path("fos_user_security_check") }}" method="post">
    {% if csrf_token %}
        <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />
    {% endif %}
	<div class='row my-2'>
		<div class='col-6 text-right'>
		    <label for="username">{{ 'security.login.username'|trans }} :</label>
		</div>
		<div class='col-6 text-left'>
		    <input type="text" id="username" name="_username" value="{{ last_username is defined ? last_username : '' }}" required="required" autocomplete="username" />
		</div>
	</div>
	<div class='row'>
		<div class='col-6 text-right'>
		    <label for="password">{{ 'security.login.password'|trans }} :</label>
		</div>
		<div class='col-6 text-left'>
		    <input type="password" id="password" name="_password" required="required" autocomplete="current-password" />
		</div>
	</div>
	<div class='row mt-4'>
		<div class='col-12 text-center'>
		    <a href="{{ path("fos_user_resetting_request") }}" class='mr-5'>{{ 'Mot de passe oublié ?'|trans }}</a>
		    <input type="checkbox" id="remember_me" name="_remember_me" value="on" />
		    <label class='ml-2' for="remember_me">{{ 'security.login.remember_me'|trans }}</label>
		</div>
	</div>
	<div class='row'>
		<div class='col-12 mx-auto text-center'>
	    	<input class='btn btn-primary' type="submit" id="_submitlogin" name="_submitlogin" value="{{ 'security.login.submit'|trans }}" />
	    </div>
	</div>
</form>