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