Merge pull request #2559 from alphagov/template-js

Template folder form smart JS
This commit is contained in:
Chris Hill-Scott
2018-12-05 16:36:12 +00:00
committed by GitHub
10 changed files with 172 additions and 43 deletions

View File

@@ -4,7 +4,8 @@
autocomplete=False,
class=None,
id=None,
module=None
module=None,
data_kwargs={}
) %}
<form
method="{{ method }}"
@@ -13,6 +14,11 @@
{% 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() }}