templates/security/forgot_password.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Authentification</title>
  7. <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
  8. <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
  9. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  10. <style>
  11.     {# html, body {
  12.         background-color: rgb(122, 163, 185);
  13.     } #}
  14. html, body {
  15.     height: 100%;
  16.     margin: 0;
  17.     padding: 0;
  18. }
  19. body {
  20.     position: relative;
  21.         background: url('/assets/img/Bg3.png') no-repeat center center fixed;/*ancienne bgcanva3.png*/
  22.     background-size: cover;
  23. }
  24. body::before {
  25.     content: "";
  26.     position: absolute;
  27.     top: 0;
  28.     left: 0;
  29.     width: 100%;
  30.     height: 100%;
  31.     background-color: rgba(255, 233, 201, 0.5); /* Couche blanche semi-transparente */
  32.     z-index: -1;
  33. }
  34.     body {
  35.         font-family: "Poppins", sans-serif;
  36.         height: 100vh;
  37.     }
  38.     a {
  39.         color: rgb(64, 120, 148);
  40.         display: inline-block;
  41.         text-decoration: none;
  42.         font-weight: 400;
  43.     }
  44.     h2 {
  45.         text-align: center;
  46.         font-size: 16px;
  47.         font-weight: 600;
  48.         text-transform: uppercase;
  49.         display: inline-block;
  50.         margin: 40px 8px 10px 8px;
  51.         color: #cccccc;
  52.     }
  53.     .wrapper {
  54.         display: flex;
  55.         align-items: center;
  56.         flex-direction: column;
  57.         justify-content: center;
  58.         width: 100%;
  59.         min-height: 100%;
  60.         padding: 20px;
  61.     }
  62.     #formContent {
  63.         border-radius: 10px;
  64.         background: #fff;
  65.         width: 90%;
  66.         max-width: 600px;
  67.         position: relative;
  68.         padding: 30px 30px 30px 30px;
  69.         box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3);
  70.         text-align: center;
  71.     }
  72.     #formTitle {
  73.         background-color: #f6f6f6;
  74.         border-top: 1px solid #dce8f1;
  75.         padding: 25px;
  76.         text-align: center;
  77.         border-radius: 0 0 10px 10px;
  78.     }
  79.     input[type=button], input[type=submit], input[type=reset] {
  80.         background-color:rgb(64, 120, 148);
  81.         border: none;
  82.         color: white;
  83.         padding: 15px 40px;
  84.         text-align: center;
  85.         text-decoration: none;
  86.         display: inline-block;
  87.         text-transform: uppercase;
  88.         font-size: 13px;
  89.         box-shadow: 0 10px 30px 0 rgba(95, 186, 233, 0.4);
  90.         border-radius: 5px;
  91.         margin: 5px 20px 40px 20px;
  92.         transition: all 0.3s ease-in-out;
  93.     }
  94.     input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
  95.         background-color:rgb(124, 168, 191);
  96.     }
  97.     input[type=text], input[type=password],input[type=email] {
  98.         background-color: #f6f6f6;
  99.         border: none;
  100.         color: #0d0d0d;
  101.         padding: 15px 32px;
  102.         text-align: center;
  103.         text-decoration: none;
  104.         display: inline-block;
  105.         font-size: 16px;
  106.         margin: 5px;
  107.         width: 85%;
  108.         border: 2px solid #f6f6f6;
  109.         transition: all 0.5s ease-in-out;
  110.         border-radius: 5px;
  111.     }
  112.     input[type=text]:focus, input[type=password]:focus {
  113.         background-color: #fff;
  114.         border-bottom: 2px solid rgb(124, 168, 191);
  115.     }
  116.     .fadeInDown {
  117.         animation: fadeInDown 1s both;
  118.     }
  119.     @keyframes fadeInDown {
  120.         0% {
  121.             opacity: 0;
  122.             transform: translate3d(0, -100%, 0);
  123.         }
  124.         100% {
  125.             opacity: 1;
  126.             transform: none;
  127.         }
  128.     }
  129.     *:focus {
  130.         outline: none;
  131.     }
  132.     .logo {
  133.         font-family: "Script MT";
  134.         font-size: 54px;
  135.         text-align: center;
  136.         color:rgb(242, 154, 78);
  137.         margin-bottom: 30px;
  138.     }
  139.     .logo .logo-font {
  140.         color:rgb(64, 120, 148);
  141.     }
  142.     @media only screen and (max-width: 767px) {
  143.         .logo {
  144.             font-size: 34px;
  145.         }
  146.     }
  147.         .sinscrire {
  148.         text-transform: uppercase;
  149.         font-size: 12px;
  150.         border-radius: 5px;
  151.         transition: all 0.3s ease-in-out;
  152.         border: 2px solid rgb(242,154,78);
  153.         color: white;
  154.         background-color: rgb(242,154,78);
  155.         padding: 10px 20px;
  156.         font-weight: bold;
  157.     }
  158.     /* Effet hover : inverser les couleurs */
  159.     .sinscrire:hover {
  160.         color: rgb(242,154,78);
  161.         background-color: white;
  162.     }
  163.     .reset-title {
  164.         font-size: 1.5rem; /* taille lisible */
  165.         font-weight: 600;  /* semi-gras moderne */
  166.         color: #2c3e50; /* gris foncé élégant */
  167.         position: relative;
  168.         display: inline-block;
  169.         padding-bottom: 8px;
  170.     }
  171.     .reset-title::after {
  172.         content: "";
  173.         position: absolute;
  174.         left: 50%;
  175.         bottom: 0;
  176.         transform: translateX(-50%);
  177.         width: 60px;
  178.         height: 3px;
  179.         background: linear-gradient(90deg, rgb(64,120,148), rgb(242,154,78)); /* dégradé bleu moderne */
  180.         border-radius: 2px;
  181.     }
  182. </style>
  183. </head>
  184. <body>
  185. <div class="wrapper fadeInDown">
  186.     <div id="formContent">
  187.         {# <form method="post" action="{{ path('email_password') }}" class="login-form m-0">
  188.             <div class="logo d-flex justify-content-center">
  189.                 <img src="{{ asset('img/logo.png') }}" alt="Logo" class="logo-img">
  190.             </div>
  191.             <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  192.             <div class="input-group mb-3">
  193.                 <input  id="email" type="email" class="form-control" placeholder="Email" name="email" required>
  194.             </div>
  195.             {% for message in app.flashes('error') %}
  196.                 <div id="emailError" class="text-center" style="color: orange; font-weight: bold; font-size: 16px;">
  197.                     {{ message }}
  198.                 </div>
  199.             {% endfor %}
  200.             <div class="input-group mb-3">
  201.                 <input type="password" class="form-control" placeholder="Mot de passe" name="password" id="password" required>
  202.             </div>
  203.             <div class="input-group mb-3">
  204.                 <input type="password" class="form-control" placeholder="Confirmer le mot de passe" name="confirm_password" id="confirm_password" required>
  205.             </div>
  206.             <div id="passwordError" class="text-danger text-center mb-3 d-none" style="color: rgb(242,154,78);">
  207.                 <p style="color: rgb(242,154,78);">Veuillez saisir des mots de passe identiques.</p>
  208.             </div>
  209.             <div class="text-center">
  210.                 <input type="submit" id="registerBtn" class="btn btn-secondary mb-0" value="Envoyer" >
  211.             </div>
  212.         </form> #}
  213.         <h3 class="text-center mb-4 reset-title">Recevez un lien de réinitialisation par email</h3>
  214.         <form method="post" action="{{ path('forgot_password') }}">
  215.             <div class="input-group mb-3">
  216.             <input type="email" name="email" placeholder="Votre email" required class="form-control mb-3">
  217.             </div>
  218.             <button type="submit" class="btn sinscrire w-25">Envoyer</button>
  219.             {% for message in app.flashes('success') %}
  220.                 <div class="alert alert-success mt-2">{{ message }}</div>
  221.             {% endfor %}
  222.             {% for message in app.flashes('error') %}
  223.                 <div class="alert alert-danger mt-2">{{ message }}</div>
  224.             {% endfor %}
  225.         </form>
  226.     </div>
  227. </div>
  228. {# <script>
  229.     document.addEventListener("DOMContentLoaded", function () {
  230.         let password = document.getElementById("password");
  231.         let confirmPassword = document.getElementById("confirm_password");
  232.         let registerBtn = document.getElementById("registerBtn");
  233.         let passwordError = document.getElementById("passwordError");
  234.         function validatePassword() {
  235.             if (password.value !== confirmPassword.value || password.value === "") {
  236.                 passwordError.classList.remove("d-none");
  237.                 registerBtn.disabled = true;
  238.             } else {
  239.                 passwordError.classList.add("d-none");
  240.                 registerBtn.disabled = false;
  241.             }
  242.         }
  243.         password.addEventListener("keyup", validatePassword);
  244.         confirmPassword.addEventListener("keyup", validatePassword);
  245.     });
  246. </script>
  247. <script>
  248.     document.addEventListener("DOMContentLoaded", function () {
  249.         let emailField = document.getElementById("email");
  250.         let emailError = document.getElementById("emailError");
  251.         if (emailField && emailError) {
  252.             emailField.addEventListener("input", function () {
  253.                 emailError.style.display = "none";
  254.             });
  255.         }
  256.     });
  257. </script>
  258. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> #}
  259. </body>
  260. </html>