@@ -864,7 +864,8 @@ <h2 data-aos="fade" data-aos-duration="700" data-aos-delay="400">1. Character Cr
864
864
} else {
865
865
// Final stage requires accountEmail
866
866
let isValid = true ;
867
- const accountEmail = document . getElementById ( 'accountEmail' ) . value . trim ( ) ;
867
+ const accountEmailInput = document . getElementById ( 'accountEmail' ) ;
868
+ const accountEmail = accountEmailInput . value . trim ( ) ;
868
869
const personalLink = document . getElementById ( 'personalLink' ) . value . trim ( ) ;
869
870
870
871
if ( ! accountEmail ) {
@@ -887,6 +888,7 @@ <h2 data-aos="fade" data-aos-duration="700" data-aos-delay="400">1. Character Cr
887
888
// Disable the Apply button and change its text
888
889
const applyButton = document . getElementById ( 'nextButton' ) ;
889
890
applyButton . disabled = true ;
891
+ accountEmailInput . setAttribute ( "disabled" , "true" ) ;
890
892
applyButton . textContent = 'Submitting...' ;
891
893
892
894
// Send the data via fetch POST request
@@ -911,6 +913,7 @@ <h2 data-aos="fade" data-aos-duration="700" data-aos-delay="400">1. Character Cr
911
913
response . text ( ) . then ( badResponse => {
912
914
customAlert ( `Failed to submit application. Please try again later.\n\n${ badResponse } ` ) . then ( ( ) => {
913
915
applyButton . disabled = false ;
916
+ accountEmailInput . setAttribute ( "disabled" , "false" ) ;
914
917
applyButton . textContent = 'Apply' ;
915
918
} ) ;
916
919
} ) ;
@@ -919,6 +922,7 @@ <h2 data-aos="fade" data-aos-duration="700" data-aos-delay="400">1. Character Cr
919
922
. catch ( error => {
920
923
customAlert ( `An error occurred while submitting your application:\n\n${ error } ` ) . then ( ( ) => {
921
924
applyButton . disabled = false ;
925
+ accountEmailInput . setAttribute ( "disabled" , "false" ) ;
922
926
applyButton . textContent = 'Apply' ;
923
927
} ) ;
924
928
} ) ;
0 commit comments