Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Reset password for webshop user #4772 #84

Merged
merged 1 commit into from
Jul 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1377,3 +1377,20 @@ span.text-success, span.text-warning, span.text-danger, span.text-info{
#featured-node img{
height: 360px;
}
.reset_password{
padding-top: 50px;
}
.reset_password .form-horizontal{
padding-top: 10px;
margin-bottom: 50px;
}
.reset_password .row{
margin-right: 0;
margin-left: 0;
}
.reset_password .reset_heading{
border-bottom: 3px solid #2980b9;
}
.reset_password #password{
margin-bottom: 10px;
}
1 change: 1 addition & 0 deletions templates/emails/reset-html.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends 'webshop/emails/reset-html.jinja' %}
1 change: 1 addition & 0 deletions templates/emails/reset-text.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends 'webshop/emails/reset-text.jinja' %}
1 change: 1 addition & 0 deletions templates/new-password.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends 'webshop/new-password.jinja' %}
1 change: 1 addition & 0 deletions templates/reset-password.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends 'webshop/reset-password.jinja' %}
22 changes: 22 additions & 0 deletions templates/webshop/emails/reset-html.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% trans %}
Dear user,
<br/>
<br/>
To reset password please click the link below:
<br/>
{% endtrans %}
<a href="{{ nereid_user.get_reset_password_link(_external=True) }}"> {% trans %}click here {% endtrans %}</a>
{% trans %}
<br/>
or copy and paste it to your browser:
{% endtrans %}
<br/>
<br/>
{{ nereid_user.get_reset_password_link(_external=True) }}
<br/>
<br/>
{% trans %}
Thanks,
<br/>
Team
{% endtrans %}
12 changes: 12 additions & 0 deletions templates/webshop/emails/reset-text.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% trans %}
Dear User,

To reset password please click the link below or paste it to your browser:
{% endtrans %}
{{ nereid_user.get_reset_password_link(_external=True) }}

{% trans %}
Thanks,

Team
{% endtrans %}
23 changes: 23 additions & 0 deletions templates/webshop/new-password.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends 'base.jinja' %}

{% from '_helpers.jinja' import render_field %}

{% block main %}
<div class="container reset_password">
<div class="row account-auth">
<div class="col-md-10 col-md-offset-1">
<h4 class="center"><span class="reset_heading">{{ _('Enter New Password') }}</span></h4>
</div>
<div class="col-md-4 col-md-offset-4">
<form class="form-horizontal" method="POST">
{{ password_form.hidden_tag() }}
{{ render_field(password_form.password, placeholder=_('Password'), required=required) }}
{{ render_field(password_form.confirm, placeholder=_('Confirm Password'), required=required) }}
<div class="form-group">
<button type="submit" class="btn btn-lg btn-block">{{ _('Reset Password') }}</button>
</div>
</form>
</div>
</div>
</div>
{% endblock main %}
26 changes: 26 additions & 0 deletions templates/webshop/reset-password.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% extends 'base.jinja' %}

{% block main %}
<div class="container reset_password">
<div class="row account-auth">
<div class="login-header center">
<h5 class="modal-title login-text">{{ _('New to shop ?') }} <a href="{{ url_for('nereid.user.registration') }}"><span>{{ _('Register here') }} </span></a></h5>
</div>
<div class="col-md-10 col-md-offset-1">
<h4 class="center"><span class="reset_heading">{{ _('Reset Password') }}</span></h4>
</div>
<div class="col-md-4 col-md-offset-4">
<form class="form-horizontal" action="{{ url_for('nereid.user.reset_account') }}" method="post">
<input name="csrf_token" type="hidden" value="{{ csrf_token() }}">
<div class="form-group">
<label for="reset_email">{{ _('e-mail *:') }}</label>
<input type="email" class="form-control" id="reset_email" placeholder="{{ _('Enter Your Email') }}" name="email" />
</div>
<div class="form-group">
<button type="submit" class="btn btn-lg btn-block">{{ _('Submit') }}</button>
</div>
</form>
</div>
</div>
</div>
{% endblock main %}