reset-form.html.twig 1.2 KB

123456789101112131415161718192021222324252627
  1. {% if uri.param('token') and uri.param('task') %}
  2. {% set client_side_validation = form.client_side_validation is not null ? form.client_side_validation : config.plugins.form.client_side_validation|default(true) %}
  3. {% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}
  4. <section id="grav-login">
  5. {{ content|raw }}
  6. <form method="post" action="{{ (base_url_relative ~ uri.path)|e }}" classes="{{ form_outer_classes }}">
  7. {% for field in form.fields %}
  8. {% set value = attribute(grav.twig.twig_vars, field.name) is defined ? attribute(grav.twig.twig_vars, field.name) : null %}
  9. {% if field.type %}
  10. <div>
  11. {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
  12. </div>
  13. {% endif %}
  14. {% endfor %}
  15. <div class="form-actions secondary-accent">
  16. <button type="submit" class="button primary" name="task" value="login.reset"><i class="fa fa-key"></i> {{ "PLUGIN_LOGIN.BTN_RESET"|t }}</button>
  17. </div>
  18. {{ nonce_field('reset-form', 'reset-form-nonce')|raw }}
  19. </form>
  20. </section>
  21. {% endif %}