aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-30 17:05:37 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-30 17:05:37 +0200
commitf98a2a0fc3ae8a5955bb811f083c3d2535f96791 (patch)
tree386ecf0a54bdf904225182e0d2f63ced417b32c5 /src/Wallabag/CoreBundle/Resources/views
parentbdf2add2e80dc52a02113c50636b5f887639b31a (diff)
parentd0c2243b1099303be961c9d4b33eaaa95e663bef (diff)
downloadwallabag-f98a2a0fc3ae8a5955bb811f083c3d2535f96791.tar.gz
wallabag-f98a2a0fc3ae8a5955bb811f083c3d2535f96791.tar.zst
wallabag-f98a2a0fc3ae8a5955bb811f083c3d2535f96791.zip
Merge pull request #1152 from wallabag/v2-forgot-password
Handle forgot password
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Mail/forgotPassword.txt.twig6
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Security/checkEmail.html.twig17
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Security/forgotPassword.html.twig31
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig15
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/Security/reset.html.twig35
5 files changed, 99 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/Mail/forgotPassword.txt.twig b/src/Wallabag/CoreBundle/Resources/views/Mail/forgotPassword.txt.twig
new file mode 100644
index 00000000..631bcb88
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/Mail/forgotPassword.txt.twig
@@ -0,0 +1,6 @@
1Hello {{username}}!
2
3To reset your password - please visit {{confirmationUrl}}
4
5Regards,
6Wallabag bot
diff --git a/src/Wallabag/CoreBundle/Resources/views/Security/checkEmail.html.twig b/src/Wallabag/CoreBundle/Resources/views/Security/checkEmail.html.twig
new file mode 100644
index 00000000..056d65b5
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/Security/checkEmail.html.twig
@@ -0,0 +1,17 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
4
5{% block body_class %}login{% endblock %}
6
7{% block menu %}{% endblock %}
8
9{% block content %}
10 <form>
11 <fieldset class="w500p center">
12 <h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
13
14 <p>{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}</p>
15 </fieldset>
16 </form>
17{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/Security/forgotPassword.html.twig b/src/Wallabag/CoreBundle/Resources/views/Security/forgotPassword.html.twig
new file mode 100644
index 00000000..4476ea7b
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/Security/forgotPassword.html.twig
@@ -0,0 +1,31 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
4
5{% block body_class %}login{% endblock %}
6
7{% block menu %}{% endblock %}
8
9{% block content %}
10 <form action="{{ path('forgot_password') }}" method="post" name="forgotPasswordform">
11 <fieldset class="w500p center">
12 <h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
13
14 {{ form_errors(form) }}
15
16 <p>Enter your email address below and we'll send you password reset instructions.</p>
17
18 <div class="row">
19 {{ form_label(form.email) }}
20 {{ form_errors(form.email) }}
21 {{ form_widget(form.email) }}
22 </div>
23
24 <div class="row mts txtcenter">
25 <button type="submit">Send me reset instructions</button>
26 </div>
27 </fieldset>
28
29 {{ form_rest(form) }}
30 </form>
31{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig b/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig
index eb8f08c8..f669574e 100644
--- a/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig
@@ -5,15 +5,19 @@
5{% block body_class %}login{% endblock %} 5{% block body_class %}login{% endblock %}
6 6
7{% block menu %}{% endblock %} 7{% block menu %}{% endblock %}
8{% block messages %}{% endblock %}
8 9
9{% block content %} 10{% block content %}
10 {% if error %}
11 <div>{{ error.message }}</div>
12 {% endif %}
13
14 <form action="{{ path('login_check') }}" method="post" name="loginform"> 11 <form action="{{ path('login_check') }}" method="post" name="loginform">
15 <fieldset class="w500p center"> 12 <fieldset class="w500p center">
16 <h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2> 13 <h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2>
14 {% if error %}
15 <div>{{ error.message }}</div>
16 {% endif %}
17
18 {% for flashMessage in app.session.flashbag.get('notice') %}
19 <p>{{ flashMessage }}</p>
20 {% endfor %}
17 21
18 <div class="row"> 22 <div class="row">
19 <label class="col w150p" for="username">{% trans %}Username{% endtrans %}</label> 23 <label class="col w150p" for="username">{% trans %}Username{% endtrans %}</label>
@@ -26,7 +30,8 @@
26 </div> 30 </div>
27 31
28 <div class="row mts txtcenter"> 32 <div class="row mts txtcenter">
29 <button type="submit">login</button> 33 <button type="submit">Login</button>
34 <a href="{{ path('forgot_password') }}" class="small">Forgot your password?</a>
30 </div> 35 </div>
31 </fieldset> 36 </fieldset>
32 </form> 37 </form>
diff --git a/src/Wallabag/CoreBundle/Resources/views/Security/reset.html.twig b/src/Wallabag/CoreBundle/Resources/views/Security/reset.html.twig
new file mode 100644
index 00000000..fda88af2
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/Security/reset.html.twig
@@ -0,0 +1,35 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{% trans %}Change password{% endtrans %}{% endblock %}
4
5{% block body_class %}login{% endblock %}
6
7{% block menu %}{% endblock %}
8
9{% block content %}
10 <form action="{{ path('forgot_password_reset', {'token': token}) }}" method="post" name="loginform">
11 <fieldset class="w500p center">
12 <h2 class="mbs txtcenter">{% trans %}Change password{% endtrans %}</h2>
13
14 {{ form_errors(form) }}
15
16 <div class="row">
17 {{ form_label(form.new_password.first) }}
18 {{ form_errors(form.new_password.first) }}
19 {{ form_widget(form.new_password.first) }}
20 </div>
21
22 <div class="row">
23 {{ form_label(form.new_password.second) }}
24 {{ form_errors(form.new_password.second) }}
25 {{ form_widget(form.new_password.second) }}
26 </div>
27
28 <div class="row mts txtcenter">
29 <button type="submit">Change password</button>
30 </div>
31 </fieldset>
32
33 {{ form_rest(form) }}
34 </form>
35{% endblock %}