From ee6353f013950e434e5e20655ca18f02fcc72682 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Wed, 9 Mar 2022 11:00:17 -0700 Subject: [PATCH] Add loading message to division --- public/scripts/manage/division.js | 4 ++++ views/manage/adddivision.pug | 1 + 2 files changed, 5 insertions(+) diff --git a/public/scripts/manage/division.js b/public/scripts/manage/division.js index a542a65..1d75742 100644 --- a/public/scripts/manage/division.js +++ b/public/scripts/manage/division.js @@ -8,6 +8,7 @@ const genderDropdown = document.getElementById('gender-dropdown'); const nameTextbox = document.getElementById('name-textbox'); const submitButton = document.getElementById('submit-button'); const deleteButton = document.getElementById('delete-button'); +const loadingSpan = document.getElementById('loading-message'); async function initializeForm() { @@ -40,6 +41,9 @@ async function initializeForm() { nameTextbox.disabled = false; nameTextbox.addEventListener('keyup', checkDataValidity); + + loadingSpan.textContent = ''; + submissionForm.style.visibility = 'visible'; } initializeForm(); diff --git a/views/manage/adddivision.pug b/views/manage/adddivision.pug index 1a17aaf..3471bc5 100644 --- a/views/manage/adddivision.pug +++ b/views/manage/adddivision.pug @@ -5,6 +5,7 @@ block stylesheets link(rel='stylesheet', href='/stylesheets/form.css') block content + span#loading-message Loading... form#submission-form(action='./division', method='POST') span(class='form-section') label Sport