mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 08:02:27 -05:00 
			
		
		
		
	[feature/frontend] add autocomplete + other helpful attributes to auth html pages
This commit is contained in:
		
					parent
					
						
							
								d308fd0d0a
							
						
					
				
			
			
				commit
				
					
						9edc7e38bd
					
				
			
		
					 2 changed files with 27 additions and 7 deletions
				
			
		|  | @ -25,18 +25,23 @@ | ||||||
|             <p>Hi <b>{{- .user -}}</b>!</p> |             <p>Hi <b>{{- .user -}}</b>!</p> | ||||||
|             <p> |             <p> | ||||||
|                 You have enabled two-factor authentication for your account. |                 You have enabled two-factor authentication for your account. | ||||||
|                 To continue signing in, please enter a code from your authenticator app. |                 To continue signing in, please enter a 6-digit code from your authenticator app. | ||||||
|             </p> |             </p> | ||||||
|             <p> |             <p> | ||||||
|                 If you have lost access to your authenticator app, you can enter one of your backup/recovery |                 If you have lost access to your authenticator app, you can enter one of your 32-character backup/recovery | ||||||
|                 codes into the form instead to bypass 2FA. Once you have used a code, it cannot be used again. |                 codes into the form instead to bypass 2FA. Once you have used a recovery code, it cannot be used again. | ||||||
|             </p> |             </p> | ||||||
|             <div class="labelinput"> |             <div class="labelinput"> | ||||||
|                 <label for="code">Code</label> |                 <label for="code">2FA Code</label> | ||||||
|                 <input |                 <input | ||||||
|                     name="code" |                     name="code" | ||||||
|  |                     id="code" | ||||||
|  |                     autocomplete="on" | ||||||
|  |                     autocapitalize="characters" | ||||||
|                     required |                     required | ||||||
|                     placeholder="Please enter a code from your authenticator app, or a one-time backup/recovery code" |                     autofocus | ||||||
|  |                     pattern="(^\d{6}$|^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{32}$)" | ||||||
|  |                     placeholder="Please enter a 6-digit code from your authenticator app, or a 32-character backup/recovery code" | ||||||
|                 > |                 > | ||||||
|             </div> |             </div> | ||||||
|             <button type="submit" class="btn btn-success">Submit</button> |             <button type="submit" class="btn btn-success">Submit</button> | ||||||
|  |  | ||||||
|  | @ -24,11 +24,26 @@ | ||||||
|         <form action="/auth/sign_in" method="POST"> |         <form action="/auth/sign_in" method="POST"> | ||||||
|             <div class="labelinput"> |             <div class="labelinput"> | ||||||
|                 <label for="email">Email</label> |                 <label for="email">Email</label> | ||||||
|                 <input type="email" name="username" required placeholder="Please enter your email address"> |                 <input | ||||||
|  |                     type="email" | ||||||
|  |                     name="username" | ||||||
|  |                     id="username" | ||||||
|  |                     autocomplete="username" | ||||||
|  |                     required | ||||||
|  |                     autofocus | ||||||
|  |                     placeholder="Please enter your email address" | ||||||
|  |                 > | ||||||
|             </div> |             </div> | ||||||
|             <div class="labelinput"> |             <div class="labelinput"> | ||||||
|                 <label for="password">Password</label> |                 <label for="password">Password</label> | ||||||
|                 <input type="password" name="password" required placeholder="Please enter your password"> |                 <input | ||||||
|  |                     type="password" | ||||||
|  |                     name="password" | ||||||
|  |                     id="password" | ||||||
|  |                     autocomplete="current-password" | ||||||
|  |                     required | ||||||
|  |                     placeholder="Please enter your password" | ||||||
|  |                 > | ||||||
|             </div> |             </div> | ||||||
|             <button type="submit" class="btn btn-success">Sign in</button> |             <button type="submit" class="btn btn-success">Sign in</button> | ||||||
|         </form> |         </form> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue