|
a |
|
b/opensourceprojects/templates/create_account.html |
|
|
1 |
{% set hide_left_bar = True %}
|
|
|
2 |
{% extends g.theme.master %}
|
|
|
3 |
|
|
|
4 |
{% block title %}Create an Account{% endblock %}
|
|
|
5 |
|
|
|
6 |
{% block header %}Create an Account{% endblock %}
|
|
|
7 |
|
|
|
8 |
{% block content %}
|
|
|
9 |
<div class="grid-20">
|
|
|
10 |
{{ c.form.display() }}
|
|
|
11 |
</div>
|
|
|
12 |
{% endblock %}
|
|
|
13 |
|
|
|
14 |
{% block extra_js %}
|
|
|
15 |
<script type="text/javascript">
|
|
|
16 |
/*<![CDATA[*/
|
|
|
17 |
$('#create_account').submit(function () {
|
|
|
18 |
if (!$('#username').attr('value').match(/^[a-zA-Z0-9]+$/)) {
|
|
|
19 |
alert('Username can only contain numbers and letters.');
|
|
|
20 |
return false;
|
|
|
21 |
}
|
|
|
22 |
if ($('#password').attr('value').length < 8) {
|
|
|
23 |
alert('Password must be at least 8 characters long.');
|
|
|
24 |
return false;
|
|
|
25 |
}
|
|
|
26 |
if ($('#password').attr('value') !== $('#confirm_password').attr('value')) {
|
|
|
27 |
alert('Password and Confirm Password must match.');
|
|
|
28 |
return false;
|
|
|
29 |
}
|
|
|
30 |
});
|
|
|
31 |
/*]]>*/
|
|
|
32 |
</script>
|
|
|
33 |
{% endblock %}
|