Invites beta
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<div id="registration">
|
||||
<h1>Help BeatHaven dominate those lousy humans!</h1>
|
||||
<%= form_tag('/reg/complete', :method => 'post') do -%>
|
||||
<%= label_tag 'email', 'E-mail' %><%= email_field_tag 'email', @email %><div id="email_error"></div>
|
||||
<div class="complete">
|
||||
<%= submit_tag 'I wanna get this guy in!' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function(){
|
||||
$('#email').focus();
|
||||
$('form').submit(function(){
|
||||
$('#email, #email_error').html('');
|
||||
if (! $('#email').val().match(/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/)) {
|
||||
$('#email_error').html('* Invalid email');
|
||||
$('#email').focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user