mirror of
				https://github.com/xfarrow/blink
				synced 2025-06-27 09:03:02 +02:00 
			
		
		
		
	login update
This commit is contained in:
		| @@ -83,7 +83,7 @@ | ||||
|             <div class="text-center text-lg-start mt-4 pt-2"> | ||||
|               <button type="button" onclick="login()" class="btn btn-primary btn-lg" | ||||
|                 style="padding-left: 2.5rem; padding-right: 2.5rem;">Login</button> | ||||
|               <p class="small fw-bold mt-2 pt-1 mb-0">Don't have an account? <a href="register.html">Register</a></p> | ||||
|               <p class="small mt-2 pt-1 mb-0">Don't have an account? <a class="link-primary text-decoration-none" href="register.html">Register</a></p> | ||||
|             </div> | ||||
|           </form> | ||||
|         </div> | ||||
| @@ -133,12 +133,26 @@ | ||||
|      * calls. Retrurns true or false | ||||
|     */ | ||||
|     function validateFields(){ | ||||
|       const email = document.getElementById("email").value; | ||||
|       const password = document.getElementById("password").value; | ||||
|       if(!email || !password || !validateEmail(email) || password.length < 5){ | ||||
|         return false; | ||||
|       const emailField = document.getElementById("email"); | ||||
|       const passwordField = document.getElementById("password"); | ||||
|       var isFormValid = true; | ||||
|  | ||||
|       if(!emailField.value || !validateEmail(emailField.value)){ | ||||
|         emailField.classList.add("is-invalid"); | ||||
|         isFormValid = false; | ||||
|       } | ||||
|       return true; | ||||
|       else{ | ||||
|         emailField.classList.remove("is-invalid"); | ||||
|       } | ||||
|  | ||||
|       if(!passwordField.value){ | ||||
|         passwordField.classList.add("is-invalid"); | ||||
|         isFormValid = false; | ||||
|       } | ||||
|       else{ | ||||
|         passwordField.classList.remove("is-invalid"); | ||||
|       } | ||||
|       return isFormValid; | ||||
|     } | ||||
|  | ||||
|     /* | ||||
|   | ||||
| @@ -112,7 +112,7 @@ | ||||
|                         <div class="row"> | ||||
|                             <div class="col-12"> | ||||
|                                 <hr class="mt-5 mb-4 border-secondary-subtle"> | ||||
|                                 <p class="m-0 text-secondary text-center">Already have an account? <a href="#!" | ||||
|                                 <p class="m-0 text-secondary text-center">Already have an account? <a href="login.html" | ||||
|                                         class="link-primary text-decoration-none">Sign in</a></p> | ||||
|                             </div> | ||||
|                         </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user