{% 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"/></div>
<label for="email_addresses" class="grid-4">Email address:</label>
<div class="grid-18"><input type="text" name="email_addresses"/></div>
<label for="open_ids" class="grid-4">Open IDs:</label>
<div class="grid-18"><input type="text" name="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"> </label>
<div class="grid-18"><input type="submit" id="submit" value="Create"/></div>
</form>
{% endblock %}
{% block extra_js %}
<script type="text/javascript">
//<!--
$('#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 %}