feat(reset_password): add invitation and reset password activation basic flow
This commit is contained in:
parent
b956bdbf05
commit
8d20cab18f
14 changed files with 328 additions and 20 deletions
11
lib/http_server/src/templates/pages/error.html
Normal file
11
lib/http_server/src/templates/pages/error.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "layouts/base.html" %}
|
||||
{% block body %}
|
||||
<h1>Internal server error</h1>
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">
|
||||
We are sorry. We've rencountered an unrecoverable error.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
54
lib/http_server/src/templates/pages/reset_password.html
Normal file
54
lib/http_server/src/templates/pages/reset_password.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{% extends "layouts/base.html" %}
|
||||
{% block body %}
|
||||
{% if reason == "Invitation" %}
|
||||
<h1>Invitation</h1>
|
||||
{% endif %}
|
||||
{% if reason == "LostPassword" %}
|
||||
<h1>Reset your password</h1>
|
||||
{% endif %}
|
||||
<!-- Reset password form -->
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">
|
||||
Error: {{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if info %}
|
||||
<div class="alert alert-info">
|
||||
Info: {{ info }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if reason == "Invitation" %}
|
||||
<p>
|
||||
Pour activer votre compte, veuillez définir votre mot de passe.
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if reason == "LostPassword" %}
|
||||
<p>
|
||||
Votre mot de passe est perdu, veuillez définir un nouveau mot de passe.
|
||||
</p>
|
||||
{% endif %}
|
||||
<form id="reset-password-form" method="post" action="/reset-password">
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">New password</label>
|
||||
<input
|
||||
id="password" name="password" type="password"
|
||||
required
|
||||
class="form-control"
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">New password confirmation</label>
|
||||
<input
|
||||
id="password_confirmation" name="password_confirmation" type="password"
|
||||
required
|
||||
class="form-control"
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
id="token" name="token" type="hidden"
|
||||
value="{{ token }}"
|
||||
/>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Change password</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue