kopia lustrzana https://github.com/wagtail/wagtail
Fix JavaScript errors when page is not in workflow
rodzic
e962ad6004
commit
cb692e5c79
|
@ -148,6 +148,7 @@
|
|||
);
|
||||
});
|
||||
|
||||
{% if current_task_state %}
|
||||
/* When a workflow action button is pressed, trigger a POST request to the workflow_action view */
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.querySelectorAll('[data-workflow-action]').forEach(function (buttonElement) {
|
||||
|
@ -185,5 +186,6 @@
|
|||
}, {capture: true});
|
||||
});
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Ładowanie…
Reference in New Issue