Fixes login and register forms
							parent
							
								
									035681ab28
								
							
						
					
					
						commit
						ecb4e0fab4
					
				|  | @ -6,12 +6,12 @@ | |||
|                 <form method="POST" action="<?= htmlspecialchars($app_root) ?>?page=login"> | ||||
| <?php include 'csrf_token.php'; ?>
 | ||||
|                     <div class="form-group mb-3"> | ||||
|                         <input type="text" class="form-control w-50 mx-auto" name="username" placeholder="Username". | ||||
|                             pattern="[a-zA-Z0-9_-]{3,20}" title="3-20 characters, letters, numbers, - and _" | ||||
|                         <input type="text" class="form-control w-50 mx-auto" name="username" placeholder="Username" | ||||
|                             pattern="[A-Za-z0-9_\-]{3,20}" title="3-20 characters, letters, numbers, - and _" | ||||
|                             required autofocus /> | ||||
|                     </div> | ||||
|                     <div class="form-group mb-3"> | ||||
|                         <input type="password" class="form-control w-50 mx-auto" name="password" placeholder="Password". | ||||
|                         <input type="password" class="form-control w-50 mx-auto" name="password" placeholder="Password" | ||||
|                             pattern=".{2,}" title="Eight or more characters" | ||||
|                             required /> | ||||
|                     </div> | ||||
|  |  | |||
|  | @ -4,12 +4,22 @@ | |||
|             <div class="card-body"> | ||||
|                 <p class="card-text">Enter credentials for registration:</p> | ||||
|                 <form method="POST" action="<?= htmlspecialchars($app_root) ?>?page=register"> | ||||
|                     <input type="text" name="username" placeholder="Username" required autofocus /> | ||||
|                     <br /> | ||||
|                     <input type="password" name="password" placeholder="Password" required /> | ||||
|                     <br /> | ||||
|                     <input type="password" name="confirm_password" placeholder="Confirm password" required /> | ||||
|                     <br /> <br /> | ||||
| <?php include 'csrf_token.php'; ?>
 | ||||
|                     <div class="form-group mb-3"> | ||||
|                         <input type="text" class="form-control w-50 mx-auto" name="username" placeholder="Username" | ||||
|                             pattern="[A-Za-z0-9_\-]{3,20}" title="3-20 characters, letters, numbers, - and _" | ||||
|                             required autofocus /> | ||||
|                     </div> | ||||
|                     <div class="form-group mb-3"> | ||||
|                         <input type="password" class="form-control w-50 mx-auto" name="password" placeholder="Password" | ||||
|                             pattern=".{8,}" title="Eight or more characters" | ||||
|                             required /> | ||||
|                     </div> | ||||
|                     <div class="form-group mb-3"> | ||||
|                         <input type="password" class="form-control w-50 mx-auto" name="confirm_password" placeholder="Confirm password" | ||||
|                             pattern=".{8,}" title="Eight or more characters" | ||||
|                             required /> | ||||
|                     </div> | ||||
|                     <input type="submit" class="btn btn-primary" value="Register" /> | ||||
|                 </form> | ||||
|             </div> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue