1717</ head >
1818
1919< body >
20- < div
21- id ="g_id_onload "
22- data-client_id ="228445846106-ttt7glup5n94jfhlj7idmsj4r0vo6bs4.apps.googleusercontent.com "
23- data-callback ="handleCredential "
24- data-auto_prompt ="false ">
20+ < div id ="g_id_onload " data-client_id ="228445846106-ttt7glup5n94jfhlj7idmsj4r0vo6bs4.apps.googleusercontent.com "
21+ data-callback ="handleCredential " data-auto_prompt ="false ">
2522 </ div >
2623 < div id ="navbar-placeholder "> </ div >
2724 < div class ="modal ">
@@ -139,14 +136,8 @@ <h1>Welcome to Rotur</h1>
139136 < i class ="fas fa-sign-in-alt "> </ i >
140137 Sign In
141138 </ button >
142- < div
143- class ="g_id_signin "
144- data-type ="standard "
145- data-size ="large "
146- data-text ="continue_with "
147- data-theme ="outline "
148- data-shape ="rectangular "
149- data-logo_alignment ="left ">
139+ < div class ="g_id_signin " data-type ="standard " data-size ="large " data-text ="continue_with " data-theme ="outline "
140+ data-shape ="rectangular " data-logo_alignment ="left ">
150141 </ div >
151142 < button class ="btn-welcome btn-welcome-secondary " id ="welcome-signup-btn ">
152143 < i class ="fas fa-user-plus "> </ i >
@@ -723,6 +714,7 @@ <h2 style="margin:0 0 4px; font-size:22px; font-weight:500;">Link This Account</
723714 if ( password !== confirmPassword ) {
724715 submitButton . innerHTML = 'Passwords do not match' ;
725716 submitButton . style . background = '#ea4335' ;
717+ hcaptcha . reset ( ) ;
726718 setTimeout ( ( ) => {
727719 submitButton . innerHTML = originalText ;
728720 submitButton . style . background = '' ;
@@ -733,6 +725,7 @@ <h2 style="margin:0 0 4px; font-size:22px; font-weight:500;">Link This Account</
733725 if ( password . length < 8 ) {
734726 submitButton . innerHTML = 'Password must be at least 8 characters' ;
735727 submitButton . style . background = '#ea4335' ;
728+ hcaptcha . reset ( ) ;
736729 setTimeout ( ( ) => {
737730 submitButton . innerHTML = originalText ;
738731 submitButton . style . background = '' ;
@@ -763,6 +756,8 @@ <h2 style="margin:0 0 4px; font-size:22px; font-weight:500;">Link This Account</
763756 const result = await response . json ( ) ;
764757
765758 if ( result . error ) {
759+ hcaptcha . reset ( ) ;
760+
766761 // Show error message below the form
767762 let errorDiv = document . getElementById ( 'signup-error-message' ) ;
768763 if ( ! errorDiv ) {
@@ -789,7 +784,6 @@ <h2 style="margin:0 0 4px; font-size:22px; font-weight:500;">Link This Account</
789784 updateModalForLoggedInUser ( ) ;
790785 } else {
791786 if ( account_data . requiresTOSAcceptance ) {
792- // Redirect to TOS acceptance page with token and return_to
793787 const tosUrl = new URL ( './terms-of-service.html' , window . location . href ) ;
794788 tosUrl . searchParams . set ( 'token' , account_data . key ) ;
795789 if ( return_to ) {
@@ -798,7 +792,6 @@ <h2 style="margin:0 0 4px; font-size:22px; font-weight:500;">Link This Account</
798792 window . location . href = tosUrl . toString ( ) ;
799793 return ;
800794 }
801- // Fallback to signin form if auto-login fails
802795 submitButton . innerHTML = 'Account created! Please sign in' ;
803796 submitButton . style . background = '#34a853' ;
804797 setTimeout ( ( ) => {
@@ -810,6 +803,7 @@ <h2 style="margin:0 0 4px; font-size:22px; font-weight:500;">Link This Account</
810803 }
811804 } catch ( error ) {
812805 console . error ( 'Signup error:' , error ) ;
806+ hcaptcha . reset ( ) ;
813807 submitButton . innerHTML = 'Error occurred' ;
814808 submitButton . style . background = '#ea4335' ;
815809
0 commit comments