2
0
Эх сурвалжийг харах

Return button tag to a tag

satof3 2 жил өмнө
parent
commit
83bb07bec5

+ 13 - 13
apps/app/src/components/LoginForm.tsx

@@ -530,15 +530,16 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
 
 
         <div className="row">
         <div className="row">
           <div className="text-end col-12 mb-5">
           <div className="text-end col-12 mb-5">
-            <button
-              type="button"
+            <a
+              href="#register"
               id="function"
               id="function"
               className="d-block btn btn-fill col-10 col-sm-9 mx-auto py-1"
               className="d-block btn btn-fill col-10 col-sm-9 mx-auto py-1"
               style={{ pointerEvents: isLoading ? 'none' : 'auto' }}
               style={{ pointerEvents: isLoading ? 'none' : 'auto' }}
-              onClick={() => { switchForm(); window.location.href = '#login' }}
+              onClick={switchForm}
             >
             >
-              <span className="material-symbols-outlined me-2 fs-5">login</span>{t('Sign in is here')}
-            </button>
+              <span className="material-symbols-outlined me-2 fs-5">login</span>
+              {t('Sign in is here')}
+            </a>
           </div>
           </div>
         </div>
         </div>
       </React.Fragment>
       </React.Fragment>
@@ -563,29 +564,28 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
                 {isSomeExternalAuthEnabled && renderExternalAuthLoginForm()}
                 {isSomeExternalAuthEnabled && renderExternalAuthLoginForm()}
                 {isLocalOrLdapStrategiesEnabled && isPasswordResetEnabled && (
                 {isLocalOrLdapStrategiesEnabled && isPasswordResetEnabled && (
                   <div className="mt-4">
                   <div className="mt-4">
-                    <button
-                      type="button"
+                    <a
+                      href="/forgot-password"
                       id="function"
                       id="function"
                       className="d-block btn btn-fill col-10 col-sm-9 mx-auto py-1"
                       className="d-block btn btn-fill col-10 col-sm-9 mx-auto py-1"
                       style={{ pointerEvents: isLoading ? 'none' : 'auto' }}
                       style={{ pointerEvents: isLoading ? 'none' : 'auto' }}
-                      onClick={() => { window.location.href = '/forgot-password' }}
                     >
                     >
                       <span className="material-symbols-outlined me-2 fs-5">vpn_key</span>{t('forgot_password.forgot_password')}
                       <span className="material-symbols-outlined me-2 fs-5">vpn_key</span>{t('forgot_password.forgot_password')}
-                    </button>
+                    </a>
                   </div>
                   </div>
                 )}
                 )}
                 {/* Sign up link */}
                 {/* Sign up link */}
                 {isRegistrationEnabled && (
                 {isRegistrationEnabled && (
                   <div className="mt-2 mb-5">
                   <div className="mt-2 mb-5">
-                    <button
-                      type="button"
+                    <a
+                      href="#register"
                       id="function"
                       id="function"
                       className="d-block btn btn-fill col-10 col-sm-9 mx-auto py-1"
                       className="d-block btn btn-fill col-10 col-sm-9 mx-auto py-1"
                       style={{ pointerEvents: isLoading ? 'none' : 'auto' }}
                       style={{ pointerEvents: isLoading ? 'none' : 'auto' }}
-                      onClick={() => { switchForm(); window.location.href = '#register' }}
+                      onClick={switchForm}
                     >
                     >
                       <span className="material-symbols-outlined me-2 fs-5">person_add</span> {t('Sign up is here')}
                       <span className="material-symbols-outlined me-2 fs-5">person_add</span> {t('Sign up is here')}
-                    </button>
+                    </a>
                   </div>
                   </div>
                 )}
                 )}
               </div>
               </div>