From 59e671e1ec6c5448b8cd43a338a795623d7ece0a Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Wed, 9 Mar 2022 11:00:27 -0700 Subject: [PATCH] Add loading message to team management --- public/scripts/manage/team.js | 5 +++++ views/manage/addteam.pug | 1 + 2 files changed, 6 insertions(+) diff --git a/public/scripts/manage/team.js b/public/scripts/manage/team.js index 4bc643e..cd5ac95 100644 --- a/public/scripts/manage/team.js +++ b/public/scripts/manage/team.js @@ -7,6 +7,8 @@ const sportDropdown = document.getElementById('sport-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() { let params = new URLSearchParams(location.search); @@ -31,6 +33,9 @@ async function initializeForm() { nameTextbox.disabled = false; nameTextbox.addEventListener('keyup', checkDataValidity); + + loadingSpan.textContent = ''; + submissionForm.style.visibility = 'visible'; } initializeForm(); diff --git a/views/manage/addteam.pug b/views/manage/addteam.pug index 78746a6..17d42d3 100644 --- a/views/manage/addteam.pug +++ b/views/manage/addteam.pug @@ -5,6 +5,7 @@ block stylesheets link(rel='stylesheet', href='/stylesheets/form.css') block content + span#loading-message Loading... form#submission-form(action='./team', method='POST') span(class='form-section') label Sport