Handle forgot password

This commit is contained in:
Jeremy
2015-03-07 23:25:36 +01:00
parent f37d1427a1
commit 6894d48e03
15 changed files with 481 additions and 8 deletions

View File

@ -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 %}
<form>
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
<p>{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}</p>
</fieldset>
</form>
{% endblock %}

View File

@ -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 %}
<form action="{{ path('forgot_password') }}" method="post" name="forgotPasswordform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
{{ form_errors(form) }}
<p>Enter your email address below and we'll send you password reset instructions.</p>
<div class="row">
{{ form_label(form.email) }}
{{ form_errors(form.email) }}
{{ form_widget(form.email) }}
</div>
<div class="row mts txtcenter">
<button type="submit">Send me reset instructions</button>
</div>
</fieldset>
{{ form_rest(form) }}
</form>
{% endblock %}

View File

@ -5,15 +5,19 @@
{% block body_class %}login{% endblock %}
{% block menu %}{% endblock %}
{% block messages %}{% endblock %}
{% block content %}
{% if error %}
<div>{{ error.message }}</div>
{% endif %}
<form action="{{ path('login_check') }}" method="post" name="loginform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2>
{% if error %}
<div>{{ error.message }}</div>
{% endif %}
{% for flashMessage in app.session.flashbag.get('notice') %}
<p>{{ flashMessage }}</p>
{% endfor %}
<div class="row">
<label class="col w150p" for="username">{% trans %}Username{% endtrans %}</label>
@ -26,7 +30,8 @@
</div>
<div class="row mts txtcenter">
<button type="submit">login</button>
<button type="submit">Login</button>
<a href="{{ path('forgot_password') }}" class="small">Forgot your password?</a>
</div>
</fieldset>
</form>

View File

@ -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 %}
<form action="{{ path('forgot_password_reset', {'token': token}) }}" method="post" name="loginform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans %}Change password{% endtrans %}</h2>
{{ form_errors(form) }}
<div class="row">
{{ form_label(form.new_password.first) }}
{{ form_errors(form.new_password.first) }}
{{ form_widget(form.new_password.first) }}
</div>
<div class="row">
{{ form_label(form.new_password.second) }}
{{ form_errors(form.new_password.second) }}
{{ form_widget(form.new_password.second) }}
</div>
<div class="row mts txtcenter">
<button type="submit">Change password</button>
</div>
</fieldset>
{{ form_rest(form) }}
</form>
{% endblock %}