add reset password functionality
This commit is contained in:
parent
23c3a24672
commit
caeec30509
16 changed files with 493 additions and 1 deletions
11
templates/reset_password/check_email.html.twig
Normal file
11
templates/reset_password/check_email.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Password Reset Email Sent{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>
|
||||
An email has been sent that contains a link that you can click to reset your password.
|
||||
This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.
|
||||
</p>
|
||||
<p>If you don't receive an email please check your spam folder or <a href="{{ path('app_forgot_password_request') }}">try again</a>.</p>
|
||||
{% endblock %}
|
9
templates/reset_password/email.html.twig
Normal file
9
templates/reset_password/email.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
<h1>Hi!</h1>
|
||||
|
||||
<p>To reset your password, please visit the following link</p>
|
||||
|
||||
<a href="{{ url('app_reset_password', {token: resetToken.token}) }}">{{ url('app_reset_password', {token: resetToken.token}) }}</a>
|
||||
|
||||
<p>This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.</p>
|
||||
|
||||
<p>Cheers!</p>
|
22
templates/reset_password/request.html.twig
Normal file
22
templates/reset_password/request.html.twig
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Reset your password{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for flashError in app.flashes('reset_password_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||
{% endfor %}
|
||||
<h1>Reset your password</h1>
|
||||
|
||||
{{ form_start(requestForm) }}
|
||||
{{ form_row(requestForm.email) }}
|
||||
<div class="mb-3">
|
||||
<small>
|
||||
Enter your email address and we we will send you a
|
||||
link to reset your password.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary">Send password reset email</button>
|
||||
{{ form_end(requestForm) }}
|
||||
{% endblock %}
|
12
templates/reset_password/reset.html.twig
Normal file
12
templates/reset_password/reset.html.twig
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Reset your password{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Reset your password</h1>
|
||||
|
||||
{{ form_start(resetForm) }}
|
||||
{{ form_row(resetForm.plainPassword) }}
|
||||
<button class="btn btn-primary">Reset password</button>
|
||||
{{ form_end(resetForm) }}
|
||||
{% endblock %}
|
Reference in a new issue