templates/security/login.html.twig line 1

  1. {% extends 'login.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block body %}
  4.         <form method="post" class="w-full max-w-md mx-auto">
  5.             {% if error %}
  6.                 <div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative mb-4" role="alert">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  7.             {% endif %}
  8.             {% if app.user %}
  9.                 <div class="mb-3">
  10.                     You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
  11.                 </div>
  12.             {% endif %}
  13.             <h1 class="text-xl font-semibold mb-3">Please sign in</h1>
  14.             <div class="mb-4">
  15.                 <label for="inputUsername" class="block text-gray-700 font-semibold mb-2">Username</label>
  16.                 <input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-input py-2 px-3 block w-full border rounded" autocomplete="username" required autofocus>
  17.             </div>
  18.             <div class="mb-6">
  19.                 <label for="inputPassword" class="block text-gray-700 font-semibold mb-2">Password</label>
  20.                 <input type="password" name="password" id="inputPassword" class="form-input py-2 px-3 block w-full border rounded" autocomplete="current-password" required>
  21.             </div>
  22.             <input type="hidden" name="_csrf_token"
  23.                    value="{{ csrf_token('authenticate') }}"
  24.             >
  25.             {#
  26.             Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  27.             See https://symfony.com/doc/current/security/remember_me.html
  28.             <div class="checkbox mb-3">
  29.                 <label>
  30.                     <input type="checkbox" name="_remember_me"> Remember me
  31.                 </label>
  32.             </div>
  33.             #}
  34.             <button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" type="submit">
  35.                 Sign in
  36.             </button>
  37.         </form>
  38. {% endblock %}