2023-12-22 13:26:01 +01:00
|
|
|
{% if form.xhr_submit == true %}
|
2024-04-05 15:26:01 +02:00
|
|
|
{% do assets.addJs('plugin://form/assets/xhr-submitter.js', {'group': 'bottom', 'position': 'before'}) %}
|
2023-12-22 13:26:01 +01:00
|
|
|
{% do assets.addInlineJs("
|
2024-04-05 15:26:01 +02:00
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
attachFormSubmitListener('" ~ form.id ~ "');
|
|
|
|
});",
|
|
|
|
{'group': 'bottom', 'position': 'before'}) %}
|
2023-12-22 13:26:01 +01:00
|
|
|
{% endif %}
|