templates/bundles/FOSUserBundle/Security/login_content.html.twig line 1

Open in your IDE?
  1. {% trans_default_domain 'FOSUserBundle' %}
  2. {% set actionUrl=path("fos_user_security_check") %}
  3. {% if app.request.attributes.get('_route') == 'fos_oauth_server_login' %}
  4.     {% set actionUrl=path("fos_oauth_server_check") %}
  5. {% endif %}
  6. <div class="container py-5">
  7.     <div class="row my-5">
  8.         <div class="col-xl-4 col-lg-4 col-md-6 col-8 mx-auto">
  9.             <form action="{{ actionUrl }}" method="post">
  10.                 {% if csrf_token %}
  11.                     <input type="hidden" name="_csrf_token" value="{{ csrf_token }}"/>
  12.                 {% endif %}
  13.                 <div class="text-center mb-4">
  14.                     <img class="mb-4" src="{{ asset('img/logo.png') }}" alt="Logo Ventour" width="220">
  15.                 </div>
  16.                 {% if error %}
  17.                     <div class="alert alert-danger" role="alert">
  18.                         {{ error.messageKey|trans(error.messageData, 'security') }}
  19.                     </div>
  20.                 {% endif %}
  21.                 <input type="text"
  22.                        id="username" name="_username" class="form-control my-2"
  23.                        placeholder="{% trans %}security.login.username{% endtrans %}" value="{{ last_username }}" autocomplete="username"
  24.                        required autofocus>
  25.                 <input type="password"
  26.                        id="password" name="_password" class="form-control my-2"
  27.                        placeholder="{% trans %}security.login.password{% endtrans %}" autocomplete="current-password"
  28.                        required>
  29.                 <div class="checkbox my-3">
  30.                     <label>
  31.                         <input type="checkbox" value="on" id="remember_me" name="_remember_me"> {% trans %}security.login.remember_me{% endtrans %}
  32.                     </label>
  33.                 </div>
  34.                 <button class="btn btn-lg btn-primary btn-block" type="submit">
  35.                     {% trans %}security.login.submit{% endtrans %}
  36.                 </button>
  37.                 <div class="w-100 mt-3">
  38.                     <p class="text-center text-secondary">
  39.                         &copy; GVAM {{ "now"|date("Y") }}
  40.                     </p>
  41.                 </div>
  42.             </form>
  43.         </div>
  44.     </div>
  45. </div>