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-09-15 08:25:16 +09:00
|
|
|
<section class="section-widget">
|
|
|
|
<form class="section-form" method="post">
|
|
|
|
<fieldset>
|
|
|
|
<legend class="section-form-legend">{{ "Login" | trans }}</legend>
|
|
|
|
|
|
|
|
{% if error %}
|
2021-09-15 22:47:29 +09:00
|
|
|
<label class="alert alert-danger">
|
|
|
|
{{ error.getMessage() }}
|
|
|
|
</label>
|
2021-09-15 08:25:16 +09:00
|
|
|
|
2021-09-15 22:47:29 +09:00
|
|
|
{#<ul>
|
2021-09-15 08:25:16 +09:00
|
|
|
{% for flashError in app.flashes('verify_email_error') %}
|
|
|
|
<li class="alert alert-danger">{{ error.messageKey | trans(error.messageData, 'security') }}</li>
|
|
|
|
{% endfor %}
|
2021-09-15 22:47:29 +09:00
|
|
|
</ul>#}
|
2021-09-15 08:25:16 +09:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% 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 %}
|
|
|
|
|
2021-10-11 01:41:30 +09:00
|
|
|
{# TODO: Login can be done with email, so the element id's should reflect that #}
|
2021-09-15 08:25:16 +09:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="section-form-label" for="inputNickname">{{ "Nickname or Email" | trans }}</label>
|
2021-10-11 01:41:30 +09:00
|
|
|
<input type="text" value="{{ last_login_id }}" name="nickname_or_email" id="inputNickname" class="form-control" required autofocus>
|
|
|
|
<p class="help-text">{{ "Your nickname or email address." | trans }}</p>
|
2021-09-15 08:25:16 +09:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="section-form-label" for="inputPassword">{{ "Password" | trans }}</label>
|
|
|
|
<input type="password" name="password" id="inputPassword" class="form-control" required>
|
|
|
|
<p class="help-text">{{ "Your account's password." | trans }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<span class="checkbox mb-3">
|
|
|
|
<input type="checkbox" name="_remember_me">
|
|
|
|
<label>{{ "Remember me" | trans }}</label>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<button class="btn btn-lg btn-primary" type="submit">Sign in</button>
|
|
|
|
</div>
|
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</section>
|
2020-10-20 07:22:31 +09:00
|
|
|
{% endblock body %}
|
2020-10-20 07:45:48 +09:00
|
|
|
|
|
|
|
{% block javascripts %}{% endblock %}
|