完成新版登录注册
This commit is contained in:
parent
aa42044199
commit
5e3df51ad9
|
@ -52,7 +52,7 @@
|
|||
$('#login_req').html('<span style="color: green">'+data.message+'</span>');
|
||||
$login_correct = true;
|
||||
} else {
|
||||
$('#login_req').html( '<span style="color: red">'+data.message+'</span>');
|
||||
$('#login_req').html( '<span style="color: #c00202">'+data.message+'</span>');
|
||||
$login_correct = false;
|
||||
}
|
||||
$('#login_req').css('display','block');
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
$mail.blur(function (event) {
|
||||
if (/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(this.value) == false){
|
||||
$('#mail_req').html( '<span style="color: red">邮件格式不对</span>').show();
|
||||
$('#mail_req').html( '<span style="color: #c00202">邮件格式不对</span>').show();
|
||||
$mail_correct = false;
|
||||
return ;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@
|
|||
$('#mail_req').html( '<span style="color: green">'+data.message+'</span>' );
|
||||
$mail_correct = true;
|
||||
} else {
|
||||
$('#mail_req').html( '<span style="color: red">'+data.message+'</span>' );
|
||||
$('#mail_req').html( '<span style="color: #c00202">'+data.message+'</span>' );
|
||||
$mail_correct = false;
|
||||
}
|
||||
$('#mail_req').css('display','block');
|
||||
|
@ -92,7 +92,7 @@
|
|||
$passwd_correct = true;
|
||||
}
|
||||
else {
|
||||
$('#passwd_req').html( '<span style="color: red">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
|
||||
$('#passwd_req').html( '<span style="color: #c00202">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
|
||||
$passwd_correct = false;
|
||||
}
|
||||
$('#passwd_req').css('display','block');
|
||||
|
@ -108,7 +108,7 @@
|
|||
$passwd_comfirm_correct = true;
|
||||
}
|
||||
else {
|
||||
$('#confirm_req').html('<span style="color: red">'+'<%= l(:setting_password_error) %>'+'</span>');
|
||||
$('#confirm_req').html('<span style="color: #c00202">'+'<%= l(:setting_password_error) %>'+'</span>');
|
||||
$passwd_comfirm_correct = false;
|
||||
|
||||
}
|
||||
|
@ -118,8 +118,6 @@
|
|||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="new_login" id = "loginInBox">
|
||||
|
@ -138,12 +136,9 @@
|
|||
<ul>
|
||||
<li>
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1', :class=>'new_loggin_input new_login_users',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
|
||||
<!--<input type="text" class="new_loggin_input new_login_users" placeholder="请输入邮箱地址或登录名">-->
|
||||
<!--<p class="new_login_error" >请输入正确的邮箱或登录名</p>-->
|
||||
</li>
|
||||
<li>
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2', :class => 'new_loggin_input new_login_lock' , :placeholder => '请输入登录密码', :onkeypress => "user_name_keypress(event);"%>
|
||||
<!--<input type="text" class="new_loggin_input new_login_lock" placeholder="请输入登录密码">-->
|
||||
<p class="new_login_error"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></p>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -155,7 +150,7 @@
|
|||
</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li><a href="javascript:void(0);" id="login_btn" class="new_login_submit" onclick="$('#main_login_form').submit();">登录</a></li>
|
||||
<li><button type="submit" class="new_login_submit"><a href="javascript:void(0);" id="login_btn" onclick="$('#main_login_form').submit();">登录</a></button></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -197,7 +192,9 @@
|
|||
<label><input type="checkbox" id="read_and_confirm" onchange="changeRegisterBtn(this);" class=" new_login_check">我已阅读并接受<a href="<%= agreement_path %>" >Trustie服务协议条款</a></label>
|
||||
</li>
|
||||
<li>
|
||||
<button type="submit" class="new_login_submit"><a href="javascript:void(0);" class="new_login_submit" id="regist_btn" onclick="register();" >注册</a></button></li>
|
||||
<div class="new_login_submit_disable" id="loginUpButton">
|
||||
<a href="javascript:void(0);" id="regist_btn" onclick="register();" class ="db" class="new_login_submit_disable" style="text-decoration: none;">注册</a>
|
||||
</div>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<body style="background-color: #fff">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -637,11 +637,11 @@ function user_name_keypress(e){
|
|||
|
||||
function changeRegisterBtn(checkbox){
|
||||
if(checkbox.checked == true){
|
||||
$("#loginUpButton").removeClass('loginUpDisableButton');
|
||||
$("#loginUpButton").addClass('loginUpButton');
|
||||
$("#loginUpButton").removeClass('new_login_submit_disable');
|
||||
$("#loginUpButton").addClass('new_login_submit');
|
||||
}else{
|
||||
$("#loginUpButton").removeClass('loginUpButton')
|
||||
$("#loginUpButton").addClass('loginUpDisableButton');
|
||||
$("#loginUpButton").removeClass('new_login_submit')
|
||||
$("#loginUpButton").addClass('new_login_submit_disable');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ function login(){
|
|||
}
|
||||
|
||||
function register(){
|
||||
if($("#loginUpButton").hasClass('loginUpDisableButton')){
|
||||
if($("#loginUpButton").hasClass('new_login_submit_disable')){
|
||||
return;
|
||||
}
|
||||
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
|
||||
|
|
|
@ -747,8 +747,8 @@ a:hover .gz_btn{color:#ff5722;}
|
|||
.homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
|
||||
|
||||
/*注册登陆页面*/
|
||||
#loginInBox {display:block; margin-top:143px;}
|
||||
#signUpBox {display:none; margin-top:79px;}
|
||||
#loginInBox {display:block;}
|
||||
#signUpBox {display:none;}
|
||||
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
|
||||
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
|
||||
#loginSignButton:hover {background-color:#05488e;}
|
||||
|
@ -1708,11 +1708,28 @@ input.new_login_lock{
|
|||
margin-bottom:15px;
|
||||
}
|
||||
.new_login_error{
|
||||
color:#c00202;
|
||||
}
|
||||
.new_login_submit_disable{
|
||||
width:265px;
|
||||
height:40px;
|
||||
line-height: 40px;
|
||||
background:#ccc;
|
||||
color:#fff;
|
||||
font-size:14px;
|
||||
-webkit-border-radius:5px;
|
||||
-moz-border-radius:5px;
|
||||
-o-border-radius:5px;
|
||||
border-radius:5px;
|
||||
border:none;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.new_login_submit{
|
||||
width:265px;
|
||||
height:40px;
|
||||
line-height: 40px;
|
||||
background:#f27d0d;
|
||||
color:#fff;
|
||||
font-size:14px;
|
||||
|
@ -1723,7 +1740,7 @@ input.new_login_lock{
|
|||
border:none;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
|
||||
vertical-align: middle;
|
||||
}
|
||||
.new_login_check{
|
||||
width:15px;
|
||||
|
|
Loading…
Reference in New Issue