diff --git a/public/scripts/manage/team.js b/public/scripts/manage/team.js index 10cd386..4bc643e 100644 --- a/public/scripts/manage/team.js +++ b/public/scripts/manage/team.js @@ -39,9 +39,10 @@ async function checkDataValidity() { if(!nameTextbox.value) dataIsValid = false; + const sportHasContent = sportDropdown.options.length; + if(!sportHasContent) dataIsValid = false; - if(dataIsValid) submitButton.disabled = false; - else submitButton.disabled = true; + submitButton.disabled = !dataIsValid; } Form.addRemoveFunction(deleteButton, submissionForm, "team"); \ No newline at end of file