2021-04-30 04:51:13 +09:00
|
|
|
{% extends 'stdgrid.html.twig' %}
|
2020-07-24 07:48:49 +09:00
|
|
|
|
2022-03-05 22:53:24 +09:00
|
|
|
{% block title %}{% trans %}Log in!{% endtrans %}{% endblock %}
|
2020-07-22 10:58:25 +09:00
|
|
|
|
2020-10-20 07:45:48 +09:00
|
|
|
{% block body %}
|
2022-01-20 08:54:45 +09:00
|
|
|
<section class="frame-section">
|
2021-09-15 08:25:16 +09:00
|
|
|
<form class="section-form" method="post">
|
2022-01-22 03:02:27 +09:00
|
|
|
<fieldset class="container-block">
|
2022-02-17 08:42:44 +09:00
|
|
|
<legend class="section-form-legend">
|
2022-03-05 22:53:24 +09:00
|
|
|
<h1>{% trans %}Login{% endtrans %}</h1>
|
2022-02-17 08:42:44 +09:00
|
|
|
</legend>
|
2021-09-15 08:25:16 +09:00
|
|
|
|
|
|
|
{% 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
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if app.user %}
|
2022-01-24 04:46:47 +09:00
|
|
|
<span>
|
2022-03-05 22:53:24 +09:00
|
|
|
{% trans %}You are logged in as %app.user.username%{% endtrans %}
|
2021-09-15 08:25:16 +09:00
|
|
|
<button class="btn btn-lg btn-primary">
|
2022-03-05 22:53:24 +09:00
|
|
|
<a href="{{ path('app_logout') }}">{% trans %}Logout{% endtrans %}</a>
|
2021-09-15 08:25:16 +09:00
|
|
|
</button>
|
2022-01-24 04:46:47 +09:00
|
|
|
</span>
|
2021-09-15 08:25:16 +09:00
|
|
|
{% else %}
|
2021-12-28 04:04:30 +09:00
|
|
|
<div class="form-row">
|
2022-03-05 22:53:24 +09:00
|
|
|
<label class="section-form-label" for="inputNicknameOrEmail">{% trans %}Nickname or Email{% endtrans %}</label>
|
2021-11-16 23:48:18 +09:00
|
|
|
<input type="text" value="{{ last_login_id }}" name="_username" id="inputNicknameOrEmail" class="form-control" required autofocus>
|
2022-03-05 22:53:24 +09:00
|
|
|
<p class="help-text">{% trans %}Your nickname or email address{% endtrans %}</p>
|
2021-09-15 08:25:16 +09:00
|
|
|
</div>
|
2022-02-07 06:37:04 +09:00
|
|
|
|
2021-12-28 04:04:30 +09:00
|
|
|
<div class="form-row">
|
2022-03-05 22:53:24 +09:00
|
|
|
<label class="section-form-label" for="inputPassword">{% trans %}Password{% endtrans %}</label>
|
2021-11-16 23:48:18 +09:00
|
|
|
<input type="password" name="_password" id="inputPassword" class="form-control" required>
|
2022-03-05 22:53:24 +09:00
|
|
|
<p class="help-text">{% trans %}Your account's password{% endtrans %}</p>
|
2021-09-15 08:25:16 +09:00
|
|
|
</div>
|
|
|
|
|
2021-12-28 04:04:30 +09:00
|
|
|
<span class="form-row-checkbox">
|
2022-03-05 22:53:24 +09:00
|
|
|
<label for="inputRememberMe">{% trans %}Remember me{% endtrans %}</label>
|
2021-11-16 23:48:18 +09:00
|
|
|
<input type="checkbox" name="_remember_me" id="inputRememberMe">
|
2021-09-15 08:25:16 +09:00
|
|
|
</span>
|
|
|
|
|
2022-03-14 07:27:59 +09:00
|
|
|
{% if app.request.query.has('next') or app.request.query.has('_next') or app.request.query.has('_target_path') %}
|
|
|
|
<input type="hidden" name="_target_path" value="{{ (app.request.query.get('next') ?? app.request.query.get('_next') ?? app.request.query.get('_target_path')) | url_encode }}">
|
2022-03-05 23:46:05 +09:00
|
|
|
{% endif %}
|
2021-11-16 23:48:18 +09:00
|
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
2021-09-15 08:25:16 +09:00
|
|
|
<div>
|
2022-01-17 05:19:41 +09:00
|
|
|
<button id="signIn" class="btn btn-lg btn-primary" type="submit">Sign in</button>
|
2021-09-15 08:25:16 +09:00
|
|
|
</div>
|
|
|
|
{% 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 %}
|