You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
661 B
HTML
26 lines
661 B
HTML
{# macro file for printing forms #}
|
|
|
|
{% macro quick_form(form, dest, autofocus=True) %}
|
|
<form action="{{ dest }}" method="post">
|
|
{% for item in form if not item.label.text == "CSRF Token" %}
|
|
|
|
{{ item.label }}
|
|
|
|
{% if loop.first and autofocus %}
|
|
{{ item(autofocus=True) }}
|
|
{% else %}
|
|
{{ item }}
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
{{ form.csrf_token }}
|
|
<input type="submit" value="Submit">
|
|
</form>
|
|
{% for field in form.errors %}
|
|
{% for error in form.errors[field] %}
|
|
<div class="alert alert-error">
|
|
<p><strong>Error in the field {{ form[field].label.text }}!</strong> {{error}}</p>
|
|
</div>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endmacro %} |