add working signup + login
This commit is contained in:
		
							parent
							
								
									bc85b7c340
								
							
						
					
					
						commit
						d8cb8c8fa8
					
				
					 27 changed files with 600 additions and 39 deletions
				
			
		|  | @ -1,19 +1,33 @@ | |||
| {% extends 'base.tpl' %} | ||||
| {% block title %} | ||||
|   Log in | ||||
|   Log in • {{ config.Name }} | ||||
| {% endblock %} | ||||
| {% block content %} | ||||
|   <div class="auth"> | ||||
|     <form method="post"> | ||||
|       <p> | ||||
|         <label for="username">Username</label> | ||||
|         <input type="text" name="username" /> | ||||
|       </p> | ||||
|       <p> | ||||
|         <label for="username">Password</label> | ||||
|         <input type="password" name="password" /> | ||||
|       </p> | ||||
|       <input type="submit" value="Log in" /> | ||||
|     </form> | ||||
|     {% if flash_message %} | ||||
|       <p>{{ flash_message }}</p> | ||||
|     {% endif %} | ||||
|     {% if not totp %} | ||||
|       <form method="post"> | ||||
|         <p> | ||||
|           <label for="username">Username</label> | ||||
|           <input type="text" name="username" /> | ||||
|         </p> | ||||
|         <p> | ||||
|           <label for="username">Password</label> | ||||
|           <input type="password" name="password" /> | ||||
|         </p> | ||||
|         <input type="submit" value="Log in" /> | ||||
|       </form> | ||||
|     {% else %} | ||||
|       <form method="post"> | ||||
|         <p> | ||||
|           <label for="totp_code">Two-factor authentication code</label> | ||||
|           <input type="text" name="totp_code" /> | ||||
|         </p> | ||||
|         <input type="text" name="totp_ticket" value="{{ totp_ticket }}" disabled /> | ||||
|         <input type="submit" value="Log in" /> | ||||
|       </form> | ||||
|     {% endif %} | ||||
|   </div> | ||||
| {% endblock %} | ||||
|  |  | |||
							
								
								
									
										30
									
								
								web/templates/auth/signup.tpl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								web/templates/auth/signup.tpl
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,30 @@ | |||
| {% extends 'base.tpl' %} | ||||
| {% block title %} | ||||
|   Sign up • {{ config.Name }} | ||||
| {% endblock %} | ||||
| {% block content %} | ||||
|   <div class="auth"> | ||||
|     {% if flash_message %} | ||||
|       <p>{{ flash_message }}</p> | ||||
|     {% endif %} | ||||
|     <form method="post"> | ||||
|       <p> | ||||
|         <label for="username">Username</label> | ||||
|         <input type="text" name="username" /> | ||||
|       </p> | ||||
|       <p> | ||||
|         <label for="username">Email</label> | ||||
|         <input type="email" name="email" /> | ||||
|       </p> | ||||
|       <p> | ||||
|         <label for="username">Password</label> | ||||
|         <input type="password" name="password" /> | ||||
|       </p> | ||||
|       <p> | ||||
|         <label for="username">Repeat password</label> | ||||
|         <input type="password" name="repeat_password" /> | ||||
|       </p> | ||||
|       <input type="submit" value="Sign up" /> | ||||
|     </form> | ||||
|   </div> | ||||
| {% endblock %} | ||||
|  | @ -4,7 +4,7 @@ | |||
|     <meta charset="UTF-8"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||||
|     <link rel="stylesheet" type="text/css" href="/static/css/style.css" /> | ||||
|     <title>{% block title %}Mercury{% endblock %}</title> | ||||
|     <title>{% block title %}{{ config.Name }}{% endblock %}</title> | ||||
| </head> | ||||
| <body> | ||||
|     {% block content %} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue