|
| 1 | +{% extends "registration/base.html" %} |
| 2 | + |
| 3 | +{% block title %}Account Creation{% endblock %} |
| 4 | + |
| 5 | +{% block scripts %} |
| 6 | + {{ block.super }} |
| 7 | + |
| 8 | +(function($) { |
| 9 | + var checkUsername = function() { |
| 10 | + var field = $(this); |
| 11 | + var url = $("#check_user_name_url").val(); |
| 12 | + var error = field.next('.username-error'); |
| 13 | + |
| 14 | + $.ajax({ |
| 15 | + url: url, |
| 16 | + data: {username: field.val()}, |
| 17 | + dataType: 'json', |
| 18 | + success: function(response) { |
| 19 | + if (response.error) { |
| 20 | + error.text(response.error); |
| 21 | + error.show(); |
| 22 | + } else { |
| 23 | + error.hide(); |
| 24 | + } |
| 25 | + } |
| 26 | + }); |
| 27 | + } |
| 28 | + |
| 29 | + $(document).ready(function(){ |
| 30 | + $('#id_email').after(' <span class="username-error" style="display: none;"></span>'); |
| 31 | + $('#id_email').keyup(checkUsername).blur(checkUsername); |
| 32 | + }); |
| 33 | +})(jQuery); |
| 34 | +{% endblock %} |
| 35 | + |
| 36 | +{% block content %} |
| 37 | +<div id="register_page"> |
| 38 | +<h1>Account Creation</h1> |
| 39 | +{% if success %} |
| 40 | +<p>Your account creation request has been received successfully. <br /> |
| 41 | + We have sent you an email with instructions on how to complete the process.</p> |
| 42 | +<p>Best regards, |
| 43 | +<br /> |
| 44 | +<br /> |
| 45 | +<blockquote> |
| 46 | + The datatracker login manager service<br /> |
| 47 | + (for the IETF Secretariat) |
| 48 | + |
| 49 | +{% else %} |
| 50 | +<form action="" method="POST"> |
| 51 | + <p>Please enter your email address in order to create a new account.</p> |
| 52 | + <table class="register-form"> |
| 53 | + {{ form }} |
| 54 | + </table> |
| 55 | + <div class="submit_row"> |
| 56 | + <input type="hidden" id="check_user_name_url" value="{% url ajax_check_username %}" /> |
| 57 | + <input type="submit" value="Submit" /> |
| 58 | + </div> |
| 59 | +</form> |
| 60 | +<p class="reset_password_description"> |
| 61 | +I'm already registered but I forgot my password. <a href="{% url password_reset %}">Please, help me reset my password.</a> |
| 62 | +</p> |
| 63 | +{% endif %} |
| 64 | +</div> |
| 65 | +{% endblock %} |
0 commit comments