2021-04-30 04:51:13 +09:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2020-07-24 07:48:49 +09:00
|
|
|
|
|
|
|
{% block stylesheets %}
|
2020-07-29 01:08:08 +09:00
|
|
|
{{ parent() }}
|
2021-04-30 07:47:42 +09:00
|
|
|
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/security/security.css') }}">
|
2020-07-24 07:48:49 +09:00
|
|
|
{% endblock %}
|
2020-07-22 10:58:25 +09:00
|
|
|
|
2021-08-12 02:42:15 +09:00
|
|
|
{% block title %}{{ "Log in!" | trans }}{% endblock %}
|
2020-07-22 10:58:25 +09:00
|
|
|
|
2020-10-20 07:45:48 +09:00
|
|
|
{% block body %}
|
2021-04-30 10:51:03 +09:00
|
|
|
<div class='content'>
|
|
|
|
<form method="post">
|
2021-07-26 23:30:55 +09:00
|
|
|
<fieldset>
|
2021-07-29 06:26:25 +09:00
|
|
|
<legend>{{ "Login" | trans }}</legend>
|
2021-07-26 23:30:55 +09:00
|
|
|
|
|
|
|
{% if error %}
|
2021-07-29 06:26:25 +09:00
|
|
|
<div class="alert alert-danger">{{ error.messageKey | trans(error.messageData, 'security') }}</div>
|
2021-07-26 23:30:55 +09:00
|
|
|
{% endif %}
|
|
|
|
|
2021-08-12 02:42:15 +09:00
|
|
|
{% if app.user %}
|
|
|
|
<h1 class="mb-3">
|
|
|
|
{{ "You are logged in as" | trans }} {{ app.user.username }}.
|
|
|
|
<button class="btn btn-lg btn-primary">
|
|
|
|
<a href="{{ path('app_logout') }}">{{ "Logout" | trans }}</a>
|
|
|
|
</button>
|
|
|
|
</h1>
|
|
|
|
{% else %}
|
|
|
|
{# TODO: Login can be done with email, so the id's and stuff should reflect that, along with using the translation facilities #}
|
|
|
|
<label for="inputNickname">{{ "Nickname or Email" | trans }}</label>
|
|
|
|
<input type="text" value="{{ last_login_id }}" name="nickname" id="inputNickname" class="form-control" required autofocus>
|
2021-07-26 23:30:55 +09:00
|
|
|
{% endif %}
|
|
|
|
|
2021-08-12 02:42:15 +09:00
|
|
|
<label for="inputPassword">{{ "Password" | trans }}</label>
|
|
|
|
<input type="password" name="password" id="inputPassword" class="form-control" required>
|
2021-07-26 23:30:55 +09:00
|
|
|
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
|
|
|
|
|
|
|
<p class="checkbox mb-3">
|
2021-08-12 02:42:15 +09:00
|
|
|
<label>{{ "Remember me" | trans }}</label>
|
2021-07-26 23:30:55 +09:00
|
|
|
<input type="checkbox" name="_remember_me">
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<button class="btn btn-lg btn-primary" type="submit">
|
|
|
|
Sign in
|
|
|
|
</button>
|
|
|
|
</fieldset>
|
2021-04-30 10:51:03 +09:00
|
|
|
</form>
|
|
|
|
</div>
|
2020-10-20 07:22:31 +09:00
|
|
|
{% endblock body %}
|
2020-10-20 07:45:48 +09:00
|
|
|
|
|
|
|
{% block javascripts %}{% endblock %}
|