Add loading message to team management
parent
ee6353f013
commit
59e671e1ec
|
@ -7,6 +7,8 @@ const sportDropdown = document.getElementById('sport-dropdown');
|
||||||
const nameTextbox = document.getElementById('name-textbox');
|
const nameTextbox = document.getElementById('name-textbox');
|
||||||
const submitButton = document.getElementById('submit-button');
|
const submitButton = document.getElementById('submit-button');
|
||||||
const deleteButton = document.getElementById('delete-button');
|
const deleteButton = document.getElementById('delete-button');
|
||||||
|
const loadingSpan = document.getElementById('loading-message');
|
||||||
|
|
||||||
|
|
||||||
async function initializeForm() {
|
async function initializeForm() {
|
||||||
let params = new URLSearchParams(location.search);
|
let params = new URLSearchParams(location.search);
|
||||||
|
@ -31,6 +33,9 @@ async function initializeForm() {
|
||||||
|
|
||||||
nameTextbox.disabled = false;
|
nameTextbox.disabled = false;
|
||||||
nameTextbox.addEventListener('keyup', checkDataValidity);
|
nameTextbox.addEventListener('keyup', checkDataValidity);
|
||||||
|
|
||||||
|
loadingSpan.textContent = '';
|
||||||
|
submissionForm.style.visibility = 'visible';
|
||||||
}
|
}
|
||||||
initializeForm();
|
initializeForm();
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ block stylesheets
|
||||||
link(rel='stylesheet', href='/stylesheets/form.css')
|
link(rel='stylesheet', href='/stylesheets/form.css')
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
span#loading-message Loading...
|
||||||
form#submission-form(action='./team', method='POST')
|
form#submission-form(action='./team', method='POST')
|
||||||
span(class='form-section')
|
span(class='form-section')
|
||||||
label Sport
|
label Sport
|
||||||
|
|
Reference in New Issue