Parent: [9151c9] (diff)

Child: [131348] (diff)

Download this file

create_account.html    47 lines (42 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{% set hide_left_bar = True %}
{% extends g.theme.master %}
{% block title %}Create an Account{% endblock %}
{% block header %}Create an Account{% endblock %}
{% block content %}
<form action="/auth/save_new" method="post" id="create_account">
<label for="display_name" class="grid-4">Display Name:</label>
<div class="grid-18"><input type="text" name="display_name" id="display_name"/></div>
<label for="email_addresses" class="grid-4">Email address:</label>
<div class="grid-18"><input type="text" name="email_addresses" id="email_addresses"/></div>
<label for="open_ids" class="grid-4">Open IDs:</label>
<div class="grid-18"><input type="text" name="open_ids" id="open_ids"/></div>
<label for="username" class="grid-4">Username:</label>
<div class="grid-18"><input type="text" name="username" id="username"/></div>
<label for="password" class="grid-4">Password:</label>
<div class="grid-18"><input type="password" name="password" id="password"/></div>
<label class="grid-4">Confirm Password:</label>
<div class="grid-18"><input type="password" id="confirm_password"/></div>
<label class="grid-4">&nbsp;</label>
<div class="grid-18"><input type="submit" id="submit" value="Create"/></div>
</form>
{% endblock %}
{% block extra_js %}
<script type="text/javascript">
/*<![CDATA[*/
$('#create_account').submit(function () {
if (!$('#username').attr('value').match(/^[a-zA-Z0-9]+$/)) {
alert('Username can only contain numbers and letters.');
return false;
}
if ($('#password').attr('value').length < 8) {
alert('Password must be at least 8 characters long.');
return false;
}
if ($('#password').attr('value') !== $('#confirm_password').attr('value')) {
alert('Password and Confirm Password must match.');
return false;
}
});
/*]]>*/
</script>
{% endblock %}