New templates for password management functionality.
- Legacy-Id: 3384
This commit is contained in:
parent
13c87fbca4
commit
5d6eede993
6
ietf/templates/registration/base.html
Normal file
6
ietf/templates/registration/base.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block morecss %}
|
||||
table.register-form ul.errorlist{ list-style-type: none; color: red; padding: 0px; margin: 0px; }
|
||||
table.register-form p { margin-top: 0px; }
|
||||
{% endblock %}
|
23
ietf/templates/registration/change_password.html
Normal file
23
ietf/templates/registration/change_password.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Change password{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="change_password_page">
|
||||
<h1>Change password</h1>
|
||||
{% if success %}
|
||||
<p>Your password has been updated.</p>
|
||||
<p>Now you can <a href="{% url ietfauth.views.ietf_login %}">sign in</a></p>
|
||||
{% else %}
|
||||
<p>Hello, you can select a new password below for your user {{ username }}.</p>
|
||||
<form action="" method="POST">
|
||||
<table class="register-form">
|
||||
{{ form }}
|
||||
</table>
|
||||
<div class="submit_row">
|
||||
<input type="submit" value="Change password" />
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
23
ietf/templates/registration/confirm.html
Normal file
23
ietf/templates/registration/confirm.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Confirm account creation{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="confirm_account_page">
|
||||
<h1>Confirm account creation</h1>
|
||||
{% if success %}
|
||||
<p>Your account with login name '{{ email }}' has been created, using the password you have select.</p>
|
||||
<p>Now you can <a href="{% url ietfauth.views.ietf_login %}">sign in</a></p>
|
||||
{% else %}
|
||||
<p>In order to complete the setup of your account with login name '{{ email }}', please set a password:</p>
|
||||
<form action="" method="POST">
|
||||
<table class="register-form">
|
||||
{{ form }}
|
||||
</table>
|
||||
<div class="submit_row">
|
||||
<input type="submit" value="Set Password" />
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
65
ietf/templates/registration/create.html
Normal file
65
ietf/templates/registration/create.html
Normal file
|
@ -0,0 +1,65 @@
|
|||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Account Creation{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ block.super }}
|
||||
|
||||
(function($) {
|
||||
var checkUsername = function() {
|
||||
var field = $(this);
|
||||
var url = $("#check_user_name_url").val();
|
||||
var error = field.next('.username-error');
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: {username: field.val()},
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.error) {
|
||||
error.text(response.error);
|
||||
error.show();
|
||||
} else {
|
||||
error.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#id_email').after(' <span class="username-error" style="display: none;"></span>');
|
||||
$('#id_email').keyup(checkUsername).blur(checkUsername);
|
||||
});
|
||||
})(jQuery);
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="register_page">
|
||||
<h1>Account Creation</h1>
|
||||
{% if success %}
|
||||
<p>Your account creation request has been received successfully. <br />
|
||||
We have sent you an email with instructions on how to complete the process.</p>
|
||||
<p>Best regards,
|
||||
<br />
|
||||
<br />
|
||||
<blockquote>
|
||||
The datatracker login manager service<br />
|
||||
(for the IETF Secretariat)
|
||||
|
||||
{% else %}
|
||||
<form action="" method="POST">
|
||||
<p>Please enter your email address in order to create a new account.</p>
|
||||
<table class="register-form">
|
||||
{{ form }}
|
||||
</table>
|
||||
<div class="submit_row">
|
||||
<input type="hidden" id="check_user_name_url" value="{% url ajax_check_username %}" />
|
||||
<input type="submit" value="Submit" />
|
||||
</div>
|
||||
</form>
|
||||
<p class="reset_password_description">
|
||||
I'm already registered but I forgot my password. <a href="{% url password_reset %}">Please, help me reset my password.</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
17
ietf/templates/registration/creation_email.txt
Normal file
17
ietf/templates/registration/creation_email.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% autoescape off %}
|
||||
Hello,
|
||||
|
||||
We have received an account creation request for {{ username }}
|
||||
at {{ domain }}. In order to set a new password for the
|
||||
{{ username }} account, please go to the following link and
|
||||
follow the instructions there:
|
||||
|
||||
http://{{ domain }}{% url confirm_account username today realm auth %}
|
||||
|
||||
This link will expire in {{ expire }} days.
|
||||
|
||||
Best regards,
|
||||
|
||||
The datatracker login manager service
|
||||
(for the IETF Secretariat)
|
||||
{% endautoescape %}
|
23
ietf/templates/registration/index.html
Normal file
23
ietf/templates/registration/index.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Account Management{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="account_index">
|
||||
<h1>Account Management</h1>
|
||||
|
||||
<p>
|
||||
<b>You can:</b>
|
||||
<ul>
|
||||
{% if user.username %}
|
||||
<li><a href="/accounts/profile/">See your profile</a></li>
|
||||
{% else %}
|
||||
<li><a href="/accounts/login/">Sign in</a></li>
|
||||
{% endif %}
|
||||
<li><a href="/accounts/create/">Request an account</a></li>
|
||||
<li><a href="/accounts/reset/">Request a password reset </a></li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
30
ietf/templates/registration/password_reset.html
Normal file
30
ietf/templates/registration/password_reset.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
{% extends "registration/base.html" %}
|
||||
|
||||
{% block title %}Password Reset Request{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="register_page">
|
||||
<h1>Password Reset Request</h1>
|
||||
{% if success %}
|
||||
<p>Your password reset request has been successfully received. <br />
|
||||
We have sent you an email with instructions on how to set a new password.</p>
|
||||
<p>Best regards,
|
||||
<br />
|
||||
<br />
|
||||
<blockquote>
|
||||
The datatracker login manager service<br />
|
||||
(for the IETF Secretariat)
|
||||
</blockquote>
|
||||
</p>
|
||||
{% else %}
|
||||
<form action="" method="POST">
|
||||
<table class="register-form">
|
||||
{{ form }}
|
||||
</table>
|
||||
<div class="submit_row">
|
||||
<input type="submit" value="Request password reset" />
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
20
ietf/templates/registration/password_reset_email.txt
Normal file
20
ietf/templates/registration/password_reset_email.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% autoescape off %}
|
||||
Hello,
|
||||
|
||||
We have received a password reset request for {{ username }}
|
||||
at {{ domain }}. In order to set a new password for the
|
||||
{{ username }} account, please go to the following link and
|
||||
follow the instructions there:
|
||||
|
||||
http://{{ domain }}{% url confirm_password_reset username today realm auth %}
|
||||
|
||||
This link will expire in {{ expire }} days.
|
||||
|
||||
If you have not requested a password reset you can ignore this email, your
|
||||
credentials have been left untouched.
|
||||
|
||||
Best regards,
|
||||
|
||||
The datatracker login manager service
|
||||
(for the IETF Secretariat)
|
||||
{% endautoescape %}
|
Loading…
Reference in a new issue