diff --git a/backend/audit/templates/audit/submission.html b/backend/audit/templates/audit/submission.html
index 0ba23c94d0..1825f4621e 100644
--- a/backend/audit/templates/audit/submission.html
+++ b/backend/audit/templates/audit/submission.html
@@ -14,11 +14,15 @@
Single Audit Submission
Please save copies of all submitted documents to your local drive. The FAC doesn't maintain these files, and can't return them for future review.
-
+
+
![spinner for processing upload]({% static 'img/loader.svg' %})
+
+
Cancel
+
{% endblock content %}
diff --git a/backend/static/js/util.js b/backend/static/js/util.js
new file mode 100644
index 0000000000..d55910622d
--- /dev/null
+++ b/backend/static/js/util.js
@@ -0,0 +1,30 @@
+/**
+ * Attach an event handler to every button with attribute "disable-submit-after-click".
+ * This will disable the button after clicking it, enable the sibling spinning icon
+ * (if it exists), and submit the form.
+ */
+function disableSubmitAfterClick() {
+ const matching_buttons = document.querySelectorAll(
+ 'button[disable-submit-after-click]'
+ );
+
+ matching_buttons.forEach((button) => {
+ const form = button.closest('form'); // Parent form
+ const loader = button.parentElement.querySelector(`div[id='loader']`); // Sibling loader
+
+ button.addEventListener('click', () => {
+ button.disabled = true;
+ button.textContent = 'Submitting...';
+ if (loader) {
+ loader.hidden = false;
+ }
+ form.submit();
+ });
+ });
+}
+
+function init() {
+ disableSubmitAfterClick();
+}
+
+window.onload = init;