From e49bb5bf2ca249a06864bc583e4acd7c7d79cb90 Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Fri, 28 Jul 2023 15:47:21 -0500 Subject: [PATCH] fix: fixing form submission --- public/creator.html | 7 ++++--- public/scripts/creator.js | 14 +++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/public/creator.html b/public/creator.html index bdf6187..e7948f3 100644 --- a/public/creator.html +++ b/public/creator.html @@ -19,7 +19,7 @@ - + @@ -35,7 +35,7 @@

Bondscape Event Creator

Note: This tool can only be used by people possessing an admin key.

-
+
Bondscape Event Creator required>
-
diff --git a/public/scripts/creator.js b/public/scripts/creator.js index 1ace01e..e5ccb5d 100644 --- a/public/scripts/creator.js +++ b/public/scripts/creator.js @@ -201,12 +201,8 @@ async function handleFormSubmission(event) { // --- Page setup // -------------------------------------------------------------------------------------------------------------------- -window.addEventListener("DOMContentLoaded", function () { - document.getElementById("eventCreationForm").addEventListener("submit", function (event) { - event.preventDefault(); - - showLoadingIndicator(); - - setTimeout(handleFormSubmission, 2000); - }); -}); \ No newline at end of file +function submitForm(event) { + event.preventDefault(); + showLoadingIndicator(); + setTimeout(handleFormSubmission, 2000); +} \ No newline at end of file