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

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

{% block body %}
	{{ parent() }}
	<main>
		<div class="loginDiv">
			{% if error %}
				<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
			{% endif %}

			<form action="{{ path('users_login') }}" method="post">
				<label for="email">Email:</label>
				<input type="text" id="email" name="_username" value="{{ last_email }}">

				<label for="password">Heslo:</label>
				<input type="password" id="password" name="_password">

				{# If you want to control the URL the user is redirected to on success
													        <input type="hidden" name="_target_path" value="/account"> #}

				<button type="submit">Přihlásit se</button>
			</form>
			<a href="{{ path('users_create') }}">Registrovat se</a>
		</div>
	</main>
{% endblock %}
