templates/auth/security/login.html.twig line 1

Open in your IDE?
  1. {% extends "auth/base.html.twig" %}
  2. {% block head_title %}{{ title('security.login_title'|trans) }}{% endblock %}
  3. {% block body %}
  4.     <form action="{{ path("security_login") }}" method="post">
  5.         <h3 class="title">{{ 'security.login_title'|trans }}</h3>
  6.         {% if error %}
  7.             <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  8.         {% endif %}
  9.         {% for label,message in app.session.flashBag.all %}
  10.             {% if label == 'error' %}{% set label = 'danger' %} {% endif %}
  11.             {% for msg in message %}
  12.                 <div class="alert alert-{{ label }}">{{ msg }}</div>
  13.             {% endfor %}
  14.         {% endfor %}
  15.         <!--Username-->
  16.         <div class="mb-3">
  17.             <label for="username" class="form-label">{{ 'security.email'|trans }}</label>
  18.             <div class="input-group">
  19.                 <span class="input-group-text" id="inputGroup-sizing-default"><i class="fas fa-user"></i></span>
  20.                 <input id="username" name="_username" value="{{ last_username }}" type="email" class="form-control"
  21.                        placeholder="{{ 'security.login_username'|trans }}" required autofocus>
  22.             </div>
  23.         </div>
  24.         <!--Password-->
  25.         <div class="mb-3">
  26.             <label for="password" class="form-label">{{ 'security.login_password'|trans }}</label>
  27.             <div class="input-group">
  28.                 <span class="input-group-text"><i class="fas fa-unlock-alt"></i></span>
  29.                 <input id="password" name="_password" type="password" class="form-control"
  30.                        placeholder="{{ 'security.login_password'|trans }}" required>
  31.             </div>
  32.         </div>
  33.         <!--Rememberme-->
  34.         <d class="d-flex mb-3">
  35.             <div class="form-check">
  36.                 <input class="form-check-input" type="checkbox" name="_remember_me" id="_remember_me" value="on">
  37.                 <label class="form-check-label" for="_remember_me">{{ 'security.login_rememberme'|trans }}</label>
  38.             </div>
  39.             <a href="{{ path('security_resetting') }}"
  40.                class="ms-auto text-muted">{{ 'security.forgot_password'|trans }}</a>
  41.         </d>
  42.         <!--CSRF-->
  43.         <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
  44.         <!--Submit-->
  45.         <div class="form-group">
  46.             <button type="submit" class="btn w-100 btn-primary">{{ 'security.login_btn'|trans }}</button>
  47.         </div>
  48.         <!--Register-->
  49.         <div class="w-100 text-center mt-3">
  50.             <a href="{{ path('security_register') }}"><span class="text-muted">{{ 'config.user.not_registred'|trans }}</span>
  51.                 <b>{{ 'security.register'|trans }}</b></a>
  52.         </div>
  53.     </form>
  54. {% endblock %}