Add a way to reset password
This commit is contained in:
parent
5d343c273f
commit
ed979719b5
12 changed files with 352 additions and 57 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{% block main_container %}
|
||||
<div class="content">
|
||||
<form action="/signup" method="post">
|
||||
<form action="/ask_reset_password" method="post">
|
||||
<label for="email_field">Your email address</label>
|
||||
<input id="email_field" type="text" name="email" value="{{ email }}" autocapitalize="none" autocomplete="email" autofocus="autofocus" />
|
||||
{{ message_email }}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@
|
|||
<span><a href="/edit_profile">{{ user.email }}</a> / <a href="/signout" />Sign out</a></span>
|
||||
{% when None %}
|
||||
<span>
|
||||
<a href="/signin" >Sign in</a>/
|
||||
<a href="/signup">Sign up</a>/
|
||||
<a href="/lost_password">Lost password</a>
|
||||
<a href="/signin" >Sign in</a>/<a href="/signup">Sign up</a>/<a href="/ask_reset_password">Lost password</a>
|
||||
</span>
|
||||
{% endmatch %}
|
||||
|
||||
|
|
|
|||
23
backend/templates/profile.html
Normal file
23
backend/templates/profile.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "base_with_list.html" %}
|
||||
|
||||
{% block content %}
|
||||
<label for="title_field">Title</label>
|
||||
<input
|
||||
id="title_field"
|
||||
type="text"
|
||||
name="title"
|
||||
value="{{ current_recipe.title }}"
|
||||
autocapitalize="none"
|
||||
autocomplete="title"
|
||||
autofocus="autofocus" />
|
||||
|
||||
<label for="description_field">Description</label>
|
||||
<input
|
||||
id="title_field"
|
||||
type="text"
|
||||
name="title"
|
||||
value="{{ current_recipe.description }}"
|
||||
autocapitalize="none"
|
||||
autocomplete="title"
|
||||
autofocus="autofocus" />
|
||||
{% endblock %}
|
||||
20
backend/templates/reset_password.html
Normal file
20
backend/templates/reset_password.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "base_with_header.html" %}
|
||||
|
||||
{% block main_container %}
|
||||
<div class="content">
|
||||
<form action="/reset_password" method="post">
|
||||
<label for="password_field_1">Choose a new password (minimum 8 characters)</label>
|
||||
<input id="password_field_1" type="password" name="password_1" />
|
||||
|
||||
<label for="password_field_1">Re-enter password</label>
|
||||
<input id="password_field_2" type="password" name="password_2" />
|
||||
|
||||
{{ message_password }}
|
||||
|
||||
<input type="hidden" name="reset_token" value="{{ reset_token }}" />
|
||||
|
||||
<input type="submit" name="commit" value="Reset password" />
|
||||
</form>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue