-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f648c33
commit c50b29a
Showing
5 changed files
with
187 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block style %} | ||
.inner-addon { | ||
position: relative; | ||
} | ||
.inner-addon .glyphicon { | ||
position: absolute; | ||
padding: 10px; | ||
pointer-events: none; | ||
} | ||
.left-addon .glyphicon { left: 0px;} | ||
.right-addon .glyphicon { right: 0px;} | ||
.left-addon input { padding-left: 30px; } | ||
.right-addon input { padding-right: 30px; } | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="row"> | ||
<h1 class="text-center">{% trans "Change Password" %}</h1> | ||
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4"> | ||
<form method="POST" action="{% url 'account_change_password' %}" class="password_change"> | ||
{% csrf_token %} | ||
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-lock"></i> | ||
<input class="form-control" type="password" id="id_oldpassword" name="oldpassword" placeholder="Old Password"> | ||
<span class="help-block">{{ form.oldpassword.errors }}</span> | ||
</div> | ||
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-lock"></i> | ||
<input class="form-control" type="password" id="id_password1" name="password1" placeholder="New Password"> | ||
<span class="help-block">{{ form.password1.errors }}</span> | ||
</div> | ||
<div class="form-group inner-addon left-addon {% if form.password2.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-lock"></i> | ||
<input class="form-control" type="password" id="id_password2" name="password2" placeholder="Confirm Password"> | ||
<span class="help-block">{{ form.password2.errors }}</span> | ||
</div> | ||
<button type="submit" class="btn btn-success pull-right" name="action">{% trans "Change Password" %}</button> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
{% load account %} | ||
|
||
{% block style %} | ||
.inner-addon { | ||
position: relative; | ||
} | ||
.inner-addon .glyphicon { | ||
position: absolute; | ||
padding: 10px; | ||
pointer-events: none; | ||
} | ||
.left-addon .glyphicon { left: 0px;} | ||
.right-addon .glyphicon { right: 0px;} | ||
.left-addon input { padding-left: 30px; } | ||
.right-addon input { padding-right: 30px; } | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% if user.is_authenticated %} | ||
{% include "account/snippets/already_logged_in.html" %} | ||
{% endif %} | ||
|
||
<div class="row"> | ||
<h1 class="text-center">{% trans "Password Reset" %}</h1> | ||
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4"> | ||
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p> | ||
|
||
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset"> | ||
{% csrf_token %} | ||
<div class="form-group inner-addon left-addon {% if form.email.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-envelope"></i> | ||
<input class="form-control" type="email" id="id_email" name="email" placeholder="Email"> | ||
<span class="help-block">{{ form.email.errors }}</span> | ||
</div> | ||
<input type="submit" class="btn btn-primary pull-right" value="{% trans 'Reset My Password' %}" /> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block style %} | ||
.inner-addon { | ||
position: relative; | ||
} | ||
.inner-addon .glyphicon { | ||
position: absolute; | ||
padding: 10px; | ||
pointer-events: none; | ||
} | ||
.left-addon .glyphicon { left: 0px;} | ||
.right-addon .glyphicon { right: 0px;} | ||
.left-addon input { padding-left: 30px; } | ||
.right-addon input { padding-right: 30px; } | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="row"> | ||
<h1 class="text-center"> | ||
{% if token_fail %} | ||
{% trans "Bad Token" %} | ||
{% else %} | ||
{% trans "Change Password" %} | ||
{% endif %} | ||
</h1> | ||
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4"> | ||
{% if token_fail %} | ||
{% url 'account_reset_password' as passwd_reset_url %} | ||
<p> | ||
{% blocktrans %} | ||
The password reset link was invalid, possibly because it has already been used. | ||
<a href="{{ passwd_reset_url }}">Try again</a>. | ||
{% endblocktrans %} | ||
</p> | ||
{% else %} | ||
{% if form %} | ||
<form method="POST" action="{{ action_url }}"> | ||
{% csrf_token %} | ||
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-lock"></i> | ||
<input class="form-control" type="password" id="id_password1" name="password1" placeholder="Password"> | ||
<span class="help-block">{{ form.password1.errors }}</span> | ||
</div> | ||
<div class="form-group inner-addon left-addon {% if form.password2.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-lock"></i> | ||
<input class="form-control" type="password" id="id_password2" name="password2" placeholder="Confirm Password"> | ||
<span class="help-block">{{ form.password2.errors }}</span> | ||
</div> | ||
<input type="submit" class="btn btn-primary pull-right" name="action" value="{% trans 'Change Password' %}"/> | ||
</form> | ||
{% else %} | ||
<p>{% trans 'Your password is now changed!' %}</p> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters