forgot-form.html.twig 1.2 KB

1234567891011121314151617181920212223242526272829
  1. {% set layout = layout ?? form.layout ?? 'default' %}
  2. {% set field_layout = layout %}
  3. {% set client_side_validation = form.client_side_validation is not null ? form.client_side_validation : config.plugins.form.client_side_validation|default(true) %}
  4. {% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}
  5. <section id="grav-login">
  6. {{ content|raw }}
  7. <form method="post" action="{{ (base_url_relative ~ uri.path)|e }}">
  8. {% for field in form.fields %}
  9. {% set field = prepare_form_field(field, field_name) %}
  10. {% if field %}
  11. {% set value = field.name == 'username' ? username : '' %}
  12. {# {% set value = form.value(field.name) %} #}
  13. {% set field_templates = include_form_field(field.type, field_layout) %}
  14. {% block field %}
  15. {% include field_templates ignore missing %}
  16. {% endblock %}
  17. {% endif %}
  18. {% endfor %}
  19. <div class="form-actions secondary-accent">
  20. <button type="submit" class="button primary" name="task" value="login.forgot"><i class="fa fa-paper-plane"></i> {{ "PLUGIN_LOGIN.BTN_SEND_INSTRUCTIONS"|t }}</button>
  21. </div>
  22. {{ nonce_field('forgot-form', 'forgot-form-nonce')|raw }}
  23. </form>
  24. </section>