2018-09-19 12:39:36 +01:00
|
|
|
{% macro form_wrapper(
|
|
|
|
|
method="post",
|
|
|
|
|
action=None,
|
|
|
|
|
autocomplete=False,
|
|
|
|
|
class=None,
|
|
|
|
|
id=None,
|
2018-12-04 14:48:39 +00:00
|
|
|
module=None,
|
|
|
|
|
data_kwargs={}
|
2018-09-19 12:39:36 +01:00
|
|
|
) %}
|
|
|
|
|
<form
|
|
|
|
|
method="{{ method }}"
|
|
|
|
|
{% if action %}action="{{ action }}"{% endif %}
|
|
|
|
|
{% if not autocomplete %}autocomplete="off"{% endif %}
|
|
|
|
|
{% if class %}class="{{ class }}"{% endif %}
|
|
|
|
|
{% if id %}id="{{ id }}"{% endif %}
|
|
|
|
|
{% if module %}data-module="{{ module }}"{% endif %}
|
2018-12-04 14:48:39 +00:00
|
|
|
{% for key, val in data_kwargs.items() %}
|
|
|
|
|
{% if val %}
|
|
|
|
|
data-{{ key }}="{{ val }}"
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endfor %}
|
2018-09-19 12:39:36 +01:00
|
|
|
novalidate
|
|
|
|
|
>
|
|
|
|
|
{{ caller() }}
|
|
|
|
|
</form>
|
|
|
|
|
{% endmacro %}
|