Improve add team page validity check
This commit is contained in:
		
							parent
							
								
									000905257e
								
							
						
					
					
						commit
						459b1a4a1a
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -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 a new issue