templates/admin/registration/request-reset-password.html.twig line 1

Open in your IDE?
  1. {% extends 'admin/base_login.html.twig' %}
  2. {% block stylesheets %}
  3.     <script src="https://www.google.com/recaptcha/api.js?render={{ recaptcha_site_key }}" async defer></script>
  4.     <script>
  5.         function executeRecaptcha() {
  6.             grecaptcha.ready(function() {
  7.                 grecaptcha.execute('{{ recaptcha_site_key }}', {action: 'submit'}).then(function(token) {
  8.                     // Dodaj token do ukrytego pola input w formularzu
  9.                     document.getElementById('g-recaptcha-response').value = token;
  10.                 });
  11.             });
  12.         }
  13.         window.onload = executeRecaptcha;
  14.     </script>
  15. {% endblock %} 
  16. {% block title %}Reset password{% endblock %}
  17. {% block body %}
  18.           <div class="card">
  19.             <div class="card-header text-white text-center">
  20.               <h4>Reset Password</h4>
  21.             </div>
  22.             <div class="card-body">
  23.         {% if success %}
  24.             <div class="alert alert-success">{{ success }}</div>
  25.                     <p>You should recieve a verification link to set a new password. Check Your mailbox..</p>
  26.             {% else %}
  27.         
  28. {% if custom_error %}
  29.             <div class="alert alert-danger">{{ custom_error }}</div>
  30.         {% endif %}
  31.     
  32.         {% for flash_error in app.flashes('verify_email_error') %}
  33.         <div class="alert alert-danger" role="alert">{{ flash_error }}</div>
  34.     {% endfor %}
  35.     {{ form_start(requestResetPasswordForm) }}
  36.           <div class="form-group">
  37.         {{ form_row(requestResetPasswordForm.email, { 'attr': {'class': 'form-control', 'autocomplete': 'email' }} ) }}
  38.                     </div>
  39.                     <input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response">
  40.             <button type="submit" class="btn btn-purple btn-block">Send email</button>
  41.     <p>Already have an account? <a href="/login">Log in.</a></p>
  42.                         <p>You'll recieve a verification link to set a new password if the account exists and it's verified.</p>
  43.     {{ form_end(requestResetPasswordForm) }}
  44.         {% endif %}
  45.             </div>
  46.           </div>
  47. {% endblock %}