templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Log in!{% endblock %}
  3. {% block body %}
  4. <form method="post">
  5.     {% if error %}
  6.         <div class="alert alert-danger">{{ 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.username }}, <a href="{{ path('app_logout') }}">Logout</a>
  11.         </div>
  12.     {% endif %}
  13.     <h1>Please sign in</h1>
  14.     <div class="mb-3"><label for="username" class="form-label required">Username</label><input type="text" id="username" name="username" required="required" maxlength="180" class="form-control" autofocus="autofocus" /></div>
  15.     <div class="mb-3"><label for="password" class="form-label required">Password (<a href="{{ path('app_forgot_password_request') }}" tabindex="-1" style="color: gray">forgot your password?</a>)</label><input type="password" id="password" name="password" required="required" class="form-control" /></div>
  16.     <input type="hidden" name="_csrf_token"
  17.            value="{{ csrf_token('authenticate') }}"
  18.     >
  19.     {#
  20.         Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  21.         See https://symfony.com/doc/current/security/remember_me.html
  22.         <div class="checkbox mb-3">
  23.             <label>
  24.                 <input type="checkbox" name="_remember_me"> Remember me
  25.             </label>
  26.         </div>
  27.     #}
  28.     <button class="btn btn-light" type="submit">
  29.         Sign in
  30.     </button> or <a href="{{ path('app_register') }}">register</a>
  31. </form>
  32. {% endblock %}