templates/login/index.html.twig line 1

Open in your IDE?
  1. {# templates/login/index.html.twig #}
  2. {% extends 'base.html.twig' %}
  3. {# ... #}
  4. {% block body %}
  5. {% if error %}
  6. <div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  7. {% endif %}
  8. <div class="card" style="width: 18rem; margin:auto;">
  9.     <div class="card-body">
  10.         <form action="{{ path('login') }}" method="post">
  11.             <div class="mb-3">
  12.                 <label for="username" class="form-label">Email:</label>
  13.                 <input type="text" id="username" class="form-control" name="_username" value="{{ last_username }}" />
  14.             </div>
  15.             <div class="mb-3">
  16.                 <label for="password" class="form-label">Password:</label>
  17.                 <input type="password" id="password" class="form-control" name="_password" />
  18.                 <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  19.             </div>
  20.             {# If you want to control the URL the user is redirected to on success
  21.             <input type="hidden" name="_target_path" value="/account" /> #}
  22.             <button type="submit" class="btn btn-ing">login</button>
  23.         </form>
  24.     </div>
  25. </div>
  26. {% endblock %}