61 lines
2.2 KiB
Twig
61 lines
2.2 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Log in{% endblock %}
|
|
|
|
{% block body %}
|
|
<form method="post">
|
|
{% if error %}
|
|
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
|
{% endif %}
|
|
|
|
{% if app.user %}
|
|
<div class="mb-3">
|
|
You are logged in as {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h3 class="mb-3 font-weight-normal">Please sign in</h3>
|
|
<div class="mb-3">
|
|
<label for="inputEmail" class="form-label">Email address</label>
|
|
{% if last_username %}
|
|
<input name="email" type="email" class="form-control" id="inputEmail" aria-describedby="emailHelp" value="{{ last_username }}" required>
|
|
{% else %}
|
|
<input name="email" type="email" class="form-control" id="inputEmail" aria-describedby="emailHelp" value="{{ last_username }}" autofocus required>
|
|
{% endif %}
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="inputPassword">Password</label>
|
|
{% if last_username %}
|
|
<input type="password" name="password" id="inputPassword" class="form-control" autofocus required>
|
|
{% else %}
|
|
<input type="password" name="password" id="inputPassword" class="form-control" required>
|
|
{% endif %}
|
|
<div class="mb-3">
|
|
<a href="{{ path('app_forgot_password_request') }}">Forgot password</a>
|
|
</div>
|
|
<div class="mb-3">
|
|
<input type="checkbox" id="remember_me" name="_remember_me"/>
|
|
<label for="remember_me">Keep me logged in</label>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" name="_csrf_token"
|
|
value="{{ csrf_token('authenticate') }}"
|
|
>
|
|
|
|
{#
|
|
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
|
See https://symfony.com/doc/current/security/remember_me.html
|
|
|
|
<div class="checkbox mb-3">
|
|
<label>
|
|
<input type="checkbox" name="_remember_me"> Remember me
|
|
</label>
|
|
</div>
|
|
#}
|
|
|
|
<button class="btn btn-lg btn-primary" type="submit">
|
|
Sign in
|
|
</button>
|
|
</form>
|
|
{% endblock %}
|