Improve add team page validity check
parent
000905257e
commit
459b1a4a1a
|
@ -39,9 +39,10 @@ async function checkDataValidity() {
|
||||||
|
|
||||||
if(!nameTextbox.value) dataIsValid = false;
|
if(!nameTextbox.value) dataIsValid = false;
|
||||||
|
|
||||||
|
const sportHasContent = sportDropdown.options.length;
|
||||||
|
if(!sportHasContent) dataIsValid = false;
|
||||||
|
|
||||||
if(dataIsValid) submitButton.disabled = false;
|
submitButton.disabled = !dataIsValid;
|
||||||
else submitButton.disabled = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Form.addRemoveFunction(deleteButton, submissionForm, "team");
|
Form.addRemoveFunction(deleteButton, submissionForm, "team");
|
Reference in New Issue