Skip to content

Commit

Permalink
Implemented Reset password for webshop user #4772
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav Goyal committed Jul 9, 2014
1 parent 11ee764 commit b4a2831
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 0 deletions.
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' %}
21 changes: 21 additions & 0 deletions templates/webshop/emails/reset-html.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% trans %}
Dear user,
<br/>
<br/>
To reset password please click the link below or paste it to your browser:
{% 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">{{ _('Reset 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 %}

0 comments on commit b4a2831

Please sign in to comment.