templates/security/forgot-password.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block stylesheets %}
  3.     {{parent()}}
  4. {% endblock %}
  5. {% block body %}
  6.     <div class="login-container">
  7.         {% for notice in app.flashes('notice') %}
  8.             <div class="alert alert-success text-center" role="alert">
  9.             {{ notice }}
  10.             </div>
  11.         {% endfor %}
  12.         {% for notice in app.flashes('error') %}
  13.             <div class="alert alert-danger" role="alert">
  14.                 {{ notice }}
  15.             </div>
  16.         {% endfor %}
  17.         {{ form_start(form) }}
  18.         <h1 class="text-uppercase">Mot de passe oublié</h1>
  19.         <p>Si vous avez oublié votre mot de passe alors inscrivez votre adresse email et un lien de réinitialisation vous sera envoyé.</p>
  20.         <div class="input-group mt-4">
  21.             <label class="input-group-text" for="inputEmail">{{ form_label(form.email) }}</label>
  22.             {{ form_widget(form.email, {'attr': {'class': 'form-control', 'aria-label': 'email', 'autocomplete': 'email'}}) }}
  23.         </div>
  24.         {# Ajout de ce bloc pour afficher les erreurs liées au champ email #}
  25.         {% if form_errors(form.email) %}
  26.             <div class="text-danger small mt-1">
  27.                 {{ form_errors(form.email) }}
  28.             </div>
  29.         {% endif %}
  30.         <button class="btn mt-4" type="submit">{{ 'Envoyer un lien de réinitialisation du mot du passe'|trans }}</button>
  31.         {{ form_end(form) }}
  32.     </div>
  33. {% endblock %}
  34. {% block javascripts %}
  35.     {{parent()}}
  36. {% endblock %}