templates/security/login.html.twig line 1

Open in your IDE?
  1. {% extends "template_1/layoutAuth.html.twig" %}
  2. {% block title %}Connexion{% endblock %}
  3.         {% block body %}
  4.             <form class="form" action="{{path('app_login')}}" method="POST" >
  5.                 {% for mesg in app.session.getflashbag.get('ina') %}
  6.                     <div class="alert alert-info ">{{mesg}}</div>
  7.                 {% endfor %}
  8.                 {% for mesg in app.session.getflashbag.get('login.user.lock') %}
  9.                     <div class="alert alert-warning ">{{mesg}}</div>
  10.                 {% endfor %}
  11.                 {% for mesg in app.session.getflashbag.get('login.user.already.login') %}
  12.                     <div class="alert alert-warning ">{{mesg}}</div>
  13.                 {% endfor %}
  14.                 {% for mesg in app.session.getflashbag.get('login.form.ivalide') %}
  15.                     <div class="alert  alert-danger ">{{mesg}} </div>
  16.                 {% endfor %}
  17.                 {% for mesg in app.session.getflashbag.get('login.user.prod.erreur') %}
  18.                     <div class="alert alert-danger ">{{mesg}}</div>
  19.                 {% endfor %}
  20.                 {% for mesg in app.session.getflashbag.get('logout.success') %}
  21.                     <div class="alert alert-success ">{{mesg}}</div>
  22.                 {% endfor %}
  23.                 {% if error %}
  24.                     <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  25.                 {% endif %}
  26.             
  27.                 {% if app.user %}
  28.                     <div class="mb-3">
  29.                         You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
  30.                     </div>
  31.                 {% endif %}
  32.                 <div class="form-group">
  33.                     <select name="prod"  class="form-control" > 
  34.                         <option value=""  > 
  35.                             {{'site.login.choisir.produit'|trans}}
  36.                         </option>
  37.                         {#% for unProduit in listeProduit%}
  38.                             <option value="{{unProduit.id}}" > 
  39.                                 {{unProduit.nomProduit}}
  40.                             </option>
  41.                         {% endfor %#}
  42.                     </select>
  43.                 </div>
  44.                 <div class="form-group mb-5">
  45.                    
  46.                     <input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control  h-auto form-control-solid py-4 px-8" autocomplete="username" placeholder="{{'site.login.pseudo'|trans}}"  required autofocus>
  47.                 </div>
  48.                 <div class="form-group mb-5">
  49.                    
  50.                     <input type="password" name="password" id="inputPassword" class="form-control  h-auto form-control-solid py-4 px-8" autocomplete="current-password"  placeholder="{{'site.login.password'|trans}}" required>
  51.                 </div>
  52.                 <div class="form-group d-flex flex-wrap justify-content-between align-items-center">
  53.                     <label class="checkbox m-0 text-muted">
  54.                     
  55.                     <span></span></label>
  56.                     <a href="{{path("admin_downlaod_app")}}" id="kt_login_forgot" class="text-muted text-hover-primary">Télécharger</a>
  57.                 </div>
  58.                 <button id="kt_login_signin_submit" class="btn btn-primary font-weight-bold px-9 py-4 my-3 mx-4">{{'site.valider'|trans}}</button>
  59.            
  60.                 <input type="hidden" name="_csrf_token"
  61.                     value="{{ csrf_token('authenticate') }}"
  62.                 >
  63.                
  64.                 <!--end::Form group-->
  65.                 <!--end::Action-->
  66.                 {% for restoreUrl in app.session.getflashbag.get('restoreUrl') %}
  67.                     <input type="hidden" name="restoreUrl" value="{{restoreUrl}}" />
  68.                 {% endfor %}
  69.             </form>
  70.             
  71.             
  72.         {% endblock %}
  73. {% block scripts %}
  74. {{parent()}}
  75. <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  76.     
  77. {% endblock %}