53 lines
2.0 KiB
Twig
53 lines
2.0 KiB
Twig
{% extends 'bare.html.twig' %}
|
|
|
|
{% block title %}Log in — Torsearch{% endblock %}
|
|
|
|
{% block body %}
|
|
<div class="flex flex-col bg-orange-500 bg-opacity-60 border-orange-500 border-2 p-4 rounded-lg gap-2 min-w-96 text-gray-50">
|
|
<h2 class="text-xl font-bold">Login</h2>
|
|
<form method="post" class="flex flex-col gap-2">
|
|
{% if error %}
|
|
<div class="bg-red-400 border-red-600 rounded p-2 text-red-600">{{ 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 %}
|
|
|
|
<label for="username" class="mb-2 flex flex-col">
|
|
Email
|
|
<input type="email"
|
|
value="{{ last_username }}"
|
|
name="_username"
|
|
id="username"
|
|
class="bg-gray-50 text-gray-950 p-1 rounded-md"
|
|
autocomplete="email"
|
|
required autofocus>
|
|
</label>
|
|
|
|
<label for="password" class="mb-2 flex flex-col">
|
|
Password
|
|
<input type="password"
|
|
name="_password"
|
|
id="password"
|
|
class="bg-gray-50 text-gray-950 p-1 rounded-md"
|
|
autocomplete="current-password"
|
|
required>
|
|
</label>
|
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" data-controller="csrf-protection">
|
|
|
|
<div class="mb-2">
|
|
<input type="checkbox" name="_remember_me" id="_remember_me">
|
|
<label for="_remember_me">Remember me</label>
|
|
</div>
|
|
|
|
|
|
<button class="bg-green-600 px-1.5 py-1 rounded-md text-gray-50" type="submit">
|
|
Sign in
|
|
</button>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|