Good registration & fair auth #23

This commit is contained in:
magnolia-fan
2011-04-13 08:42:44 +04:00
parent e20ed483c1
commit 957a883ccf
6 changed files with 63 additions and 6 deletions
+2
View File
@@ -9,6 +9,8 @@
<%= csrf_meta_tag %>
</head>
<body>
<br/><br/><br/><br/>
<%= @params %>
<div id="contents">
<div class="inner-1">
<div id="player">
+24
View File
@@ -0,0 +1,24 @@
<div id="registration">
<h1>Do BeatHaven know you?</h1>
<%= form_tag('/login', :method => 'post') do -%>
<%= label_tag 'email', 'E-mail' %><%= email_field_tag 'email', nil %>
<%= label_tag 'password', 'Password' %><%= password_field_tag 'password', nil %><div id="password_error"></div>
<div class="complete">
<%= submit_tag 'Let me in!' %>
</div>
<% end -%>
</div>
<script type="text/javascript" charset="utf-8">
$(function(){
$('#email').focus();
$('form').submit(function(){
$('#password_error, #password_c_error').html('');
if ($('#password').val().length < 6) {
$('#password_error').html('* You must be kidding?');
$('#password').focus();
return false;
}
return true;
})
})
</script>