From 6894d48e03c397096bb64420373afa60c397fe97 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Sat, 7 Mar 2015 23:25:36 +0100 Subject: Handle forgot password --- .../Resources/views/Mail/forgotPassword.txt.twig | 6 ++++ .../Resources/views/Security/checkEmail.html.twig | 17 +++++++++++ .../views/Security/forgotPassword.html.twig | 31 +++++++++++++++++++ .../Resources/views/Security/login.html.twig | 15 ++++++---- .../Resources/views/Security/reset.html.twig | 35 ++++++++++++++++++++++ 5 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 src/Wallabag/CoreBundle/Resources/views/Mail/forgotPassword.txt.twig create mode 100644 src/Wallabag/CoreBundle/Resources/views/Security/checkEmail.html.twig create mode 100644 src/Wallabag/CoreBundle/Resources/views/Security/forgotPassword.html.twig create mode 100644 src/Wallabag/CoreBundle/Resources/views/Security/reset.html.twig (limited to 'src/Wallabag/CoreBundle/Resources/views') 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 @@ +Hello {{username}}! + +To reset your password - please visit {{confirmationUrl}} + +Regards, +Wallabag 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 @@ +{% extends "WallabagCoreBundle::layout.html.twig" %} + +{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %} + +{% block body_class %}login{% endblock %} + +{% block menu %}{% endblock %} + +{% block content %} +
+
+

{% trans %}Forgot password{% endtrans %}

+ +

{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}

+
+
+{% 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 @@ +{% extends "WallabagCoreBundle::layout.html.twig" %} + +{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %} + +{% block body_class %}login{% endblock %} + +{% block menu %}{% endblock %} + +{% block content %} +
+
+

{% trans %}Forgot password{% endtrans %}

+ + {{ form_errors(form) }} + +

Enter your email address below and we'll send you password reset instructions.

+ +
+ {{ form_label(form.email) }} + {{ form_errors(form.email) }} + {{ form_widget(form.email) }} +
+ +
+ +
+
+ + {{ form_rest(form) }} +
+{% 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 @@ {% block body_class %}login{% endblock %} {% block menu %}{% endblock %} +{% block messages %}{% endblock %} {% block content %} - {% if error %} -
{{ error.message }}
- {% endif %} -

{% trans %}Login to wallabag{% endtrans %}

+ {% if error %} +
{{ error.message }}
+ {% endif %} + + {% for flashMessage in app.session.flashbag.get('notice') %} +

{{ flashMessage }}

+ {% endfor %}
@@ -26,7 +30,8 @@
- + + Forgot your password?
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 @@ +{% extends "WallabagCoreBundle::layout.html.twig" %} + +{% block title %}{% trans %}Change password{% endtrans %}{% endblock %} + +{% block body_class %}login{% endblock %} + +{% block menu %}{% endblock %} + +{% block content %} +
+
+

{% trans %}Change password{% endtrans %}

+ + {{ form_errors(form) }} + +
+ {{ form_label(form.new_password.first) }} + {{ form_errors(form.new_password.first) }} + {{ form_widget(form.new_password.first) }} +
+ +
+ {{ form_label(form.new_password.second) }} + {{ form_errors(form.new_password.second) }} + {{ form_widget(form.new_password.second) }} +
+ +
+ +
+
+ + {{ form_rest(form) }} +
+{% endblock %} -- cgit v1.2.3