webroot/templates/security/login.html.twig

50 lines
2.1 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Log in!{% endblock %}
{% block main %}
<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.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<fieldset style="min-width: 400px;max-width: 650px;" class="center">
<legend><h3 class="h3 mb-3 font-weight-normal">{{ login_title }}</h3></legend>
<table class="full-width">
<tr>
<th class="shrink-to-fit standard-background left">
<label for="username">{{ login_username }}</label>
</th>
<td class="full-width left">
<input type="text" value="{{ last_username }}" name="_username" id="username" class="form-control full-width" autocomplete="username" required autofocus>
</td>
</tr>
<tr>
<th class="shrink-to-fit standard-background left">
<label for="password">{{ login_password }}</label>
</th>
<td class="full-width left">
<input type="password" name="_password" id="password" class="form-control full-width" autocomplete="current-password" required>
</td>
<tr>
<tr>
<td colspan="2" class="left">
<input type="checkbox" name="_remember_me" id="_remember_me">
<label for="_remember_me">{{ login_remember_me }}</label>
</td>
</tr>
</table>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<button class="btn btn-lg btn-primary" type="submit" class="right">{{ login_button }}</button>
</fieldset>
</form>
{% endblock %}