templates/security/login.html.twig line 1

  1. {% extends 'base2.html.twig' %}
  2. {% block title %}Connectez-vous !{% endblock %}
  3. {% block body %}
  4.     <section>
  5.       <div class="container mx-auto">
  6.         <div
  7.           class="grid lg:grid-cols-2 grid-cols-1 gap-10 bg-white p-10 items-center rounded-lg"
  8.         >
  9.           <img
  10.             class="w-full lg:block hidden rounded-2xl"
  11.             src="images/commercants2.webp"
  12.             alt=""
  13.           />
  14.           <div class="">
  15.             <div class="text-center mb-6">
  16.               <a href="/">
  17.                 <img
  18.                   class="w-50 mx-auto h-aFlogoututo mb-2"
  19.                   src="../img/bos_logo.png"
  20.                   alt=""
  21.                 />
  22.               </a>
  23.               <h1 class="text-gray-700 text-3xl font-semibold mb-3">
  24.                 Connectez-vous à votre espace
  25.               </h1>
  26.               <p class="text-base text-gray-500 mb-7">
  27.                 Si vous souhaitez vous inscrire
  28.                 <a href="{{ path('app_shop_new') }}" class="text-blue-500 font-medium"
  29.                   >c'est par ici !</a
  30.                 >
  31.               </p>
  32.             </div>
  33.             <form method="post">
  34.                 {% if error %}
  35.                     <div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  36.                 {% endif %}
  37.                 {% if app.user %}
  38.                     <div class="mb-3">
  39.                         You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
  40.                     </div>
  41.                 {% endif %}
  42.     
  43.             <div class="">
  44.               <label for="inputEmail" class="text-gray-700 font-medium mb-1"
  45.                 >Votre email <sup>*</sup></label
  46.               >
  47.               <div class="relative mb-5">
  48.                 <svg
  49.                   xmlns="http://www.w3.org/2000/svg"
  50.                   class="h-5 w-4 text-gray-400 absolute top-1/2 -translate-y-1/2 ml-3"
  51.                   fill="none"
  52.                   viewBox="0 0 24 24"
  53.                   stroke="currentColor"
  54.                   stroke-width="2"
  55.                 >
  56.                   <path
  57.                     stroke-linecap="round"
  58.                     stroke-linejoin="round"
  59.                     d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
  60.                   />
  61.                 </svg>
  62.                 <input
  63.                   type="email"
  64.                   value="{{ last_username }}" 
  65.                   name="email" 
  66.                   id="inputEmail" 
  67.                   class="border pl-9 border-gray-200 dark:border-gray-800 dark:text-gray-300 rounded-lg dark:bg-foreground py-4 focus:outline-none w-full"
  68.                   placeholder="Entrez votre email"
  69.                   autocomplete="email" 
  70.                   required autofocus
  71.                 />
  72.               </div>
  73.               <label for="inputPassword" class="text-gray-700 font-medium mb-1"
  74.                 >Mot de passe <sup>*</sup></label
  75.               >
  76.               <div class="relative mb-5">
  77.                 <svg
  78.                   class="h-5 w-4 text-gray-400 absolute top-1/2 -translate-y-1/2 ml-3"
  79.                   xmlns="http://www.w3.org/2000/svg"
  80.                   class="h-6 w-6"
  81.                   fill="none"
  82.                   viewBox="0 0 24 24"
  83.                   stroke="currentColor"
  84.                   stroke-width="2"
  85.                 >
  86.                   <path
  87.                     stroke-linecap="round"
  88.                     stroke-linejoin="round"
  89.                     d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"
  90.                   />
  91.                 </svg>
  92.                 <input
  93.                   type="password"
  94.                   name="password" 
  95.                   id="inputPassword" 
  96.                   class="border pl-9 border-gray-200 dark:border-gray-800 dark:text-gray-300 rounded-lg dark:bg-foreground py-4 focus:outline-none w-full"
  97.                   placeholder="Entrez votre mot de passe"
  98.                   autocomplete="current-password" 
  99.                   required    
  100.                 />
  101.               </div>
  102.                 <input type="hidden" name="_csrf_token"
  103.                     value="{{ csrf_token('authenticate') }}"
  104.                 >
  105.               <div class="flex justify-between flex-wrap mb-3">
  106.               {#
  107.               Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
  108.         See https://symfony.com/doc/current/security/remember_me.html
  109.                 <div class="mb-3">
  110.                   <input
  111.                     type="checkbox"
  112.                     id="vehicle1"
  113.                     name="_remember_me"
  114.                     value="Bike"
  115.                     class="border border-gray-500"
  116.                   />
  117.                   <label for="vehicle1" class="text-gray-500 font-normal">
  118.                     Remember me?</label
  119.                   >
  120.                 </div>
  121.                 #}
  122.                 <a href="{{ path('app_forgot_password_request') }}" class="text-red-500 mb-3">Mot de passe oublié ?</a>
  123.               </div>
  124.               <button
  125.                 type="submit"
  126.                 class="w-full flex justify-center items-center bg-blue-500 hover:bg-blue-600 rounded-lg text-white p-4 mb-7"
  127.               >
  128.                 Se connecter
  129.               </button>
  130.         </form>
  131.       </div>
  132.     </section>
  133. {% endblock %}