33 lines
1.3 KiB
Twig
33 lines
1.3 KiB
Twig
{% extends 'base/base.html.twig' %}
|
|
|
|
{% block title %}Login{% endblock %}
|
|
|
|
{% block body %}
|
|
<form action="{{ path('login') }}" 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 already logged in as {{ app.user }}, <a href="{{ path('logout') }}">Logout</a>
|
|
</div>
|
|
{% endif %}
|
|
<h1 class="h3 mb-3 font-weight-normal">Please login</h1>
|
|
<label for="inputUsername">Username</label>
|
|
<input type="text" value="{{ last_username }}" name="_username" id="inputUsername" class="form-control" required
|
|
autofocus>
|
|
<br/>
|
|
<label for="inputPassword">Password</label>
|
|
<input type="password" name="_password" id="inputPassword" class="form-control" required>
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
|
<br/>
|
|
|
|
<div class="checkbox mb-3">
|
|
<label>
|
|
<input type="checkbox" name="_remember_me"> Remember me
|
|
</label>
|
|
</div>
|
|
<button class="btn btn-primary" type="submit">Login</button>
|
|
</form>
|
|
{% endblock %}
|