mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
the html now contains a `data-prev-state` attribute which contains the previous state, taken from the `operation` value in the form data (from the submit button). This is used to seed the `currentState` of the templateFolderForm. If not specified (or 'unknown', because the user hit enter last time round), then set it to nothingSelectedButtons.
27 lines
628 B
HTML
27 lines
628 B
HTML
{% macro form_wrapper(
|
|
method="post",
|
|
action=None,
|
|
autocomplete=False,
|
|
class=None,
|
|
id=None,
|
|
module=None,
|
|
data_kwargs={}
|
|
) %}
|
|
<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 %}
|
|
{% for key, val in data_kwargs.items() %}
|
|
{% if val %}
|
|
data-{{ key }}="{{ val }}"
|
|
{% endif %}
|
|
{% endfor %}
|
|
novalidate
|
|
>
|
|
{{ caller() }}
|
|
</form>
|
|
{% endmacro %}
|