-
-
-
-
<%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %>
-
-
+
+
+
- <%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
- <%= back_url_hidden_field_tag %>
-
- <%= text_field_tag 'username', params[:username], :tabindex => '1' ,
- :class=>'loginSignBox',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
-
-
- <% if Setting.openid? %>
-
- <%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %>
-
- <% end %>
-
-
- <%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%>
-
-
- <% if Setting.autologin? %>
-
- <%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
+
+
+
+
+<%# 注册 %>
+
+
+
+
欢迎加入Trustie创新实践社区
+
在这里,您的创新意识和创新潜力将得到充分发挥!目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。
+
+
-
-
-
-
- - 注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %>
-
-
-
-
- <%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %>
- <%= error_messages_for 'user' %>
-
-
- <%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%>
-
请输入有效邮箱地址
-
-
-
- <%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %>
-
至少需要 6 个字符
-
-
-
- <%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %>
-
密码不一致
-
-
-
- <%= f.text_field :login, :size => 25,:placeholder=>"请输入用户登录名",:class=>'loginSignBox'%>
-
用户登录名为2-18个中英文,数字或下划线
-
-
-
- <% end %>
-
-
+
diff --git a/app/views/layouts/login.html.erb b/app/views/layouts/login.html.erb
index 60ffbce1a..c20335b1d 100644
--- a/app/views/layouts/login.html.erb
+++ b/app/views/layouts/login.html.erb
@@ -14,19 +14,8 @@
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
-
-
-
-
+
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>
diff --git a/public/images/login/bg_login.jpg b/public/images/login/bg_login.jpg
new file mode 100644
index 000000000..c56af093d
Binary files /dev/null and b/public/images/login/bg_login.jpg differ
diff --git a/public/images/login/bg_register.jpg b/public/images/login/bg_register.jpg
new file mode 100644
index 000000000..6989550c6
Binary files /dev/null and b/public/images/login/bg_register.jpg differ
diff --git a/public/images/login/icons_login.png b/public/images/login/icons_login.png
new file mode 100644
index 000000000..9d1ba136d
Binary files /dev/null and b/public/images/login/icons_login.png differ
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index b6301afad..d2eb7a168 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -627,4 +627,52 @@ var autoTextarea2 = function (elem,elem2, extra, maxHeight) {
addEvent(elem2, 'input', change);
addEvent(elem2, 'focus', change);
change();
-};
\ No newline at end of file
+};
+
+function user_name_keypress(e){
+ if (e.keyCode == '13') {
+ $('#main_login_form').submit();
+ }
+}
+
+function changeRegisterBtn(checkbox){
+ if(checkbox.checked == true){
+ $("#loginUpButton").removeClass('new_login_submit_disable');
+ $("#loginUpButton").addClass('new_login_submit');
+ }else{
+ $("#loginUpButton").removeClass('new_login_submit')
+ $("#loginUpButton").addClass('new_login_submit_disable');
+ }
+}
+
+function clearInfo(id, content) {
+ var text = $('#' + id);
+ if (text.val() == content) {
+ $('#' + id).val('');
+ }
+}
+
+function showInfo(id, content) {
+ var text = $('#' + id);
+ if (text.val() == '') {
+ $('#' + id).val(content);
+ }
+}
+
+function login(){
+ $('#main_login_form').submit(); //表单提交没有任何反应的原因:js冲突
+}
+
+function register(){
+ if($("#loginUpButton").hasClass('new_login_submit_disable')){
+ return;
+ }
+ if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
+ $("#main_reg_form").submit();
+ }else{
+ $('#user_login').blur();
+ $('#user_mail').blur();
+ $('#user_password').blur();
+ $('#user_password_confirmation').blur();
+ }
+}
\ No newline at end of file
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 32e727ba4..53b252428 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -537,13 +537,13 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
/*新个人主页框架css*/
-.navContainer {width:100%; margin:0 auto; background-color:#3b94d6;}
+.navContainer {width:100%; margin:0 auto; background-color:#1065bd;}
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
-.navHomepage {width:1000px; height:54px; background-color:#3b94d6; margin:0 auto;}
+.navHomepage {width:1000px; height:54px; background-color:#1065bd; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
-.navHomepageMenu:hover {background-color:#297fb8;}
+.navHomepageMenu:hover {background-color:#05488e;}
/*.navHomepageMenu:hover {background-color:#0ea6b7;}*/
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
@@ -747,12 +747,12 @@ 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:#297fb8;}
-#loginInButton:hover {background-color:#297fb8;}
+#loginSignButton:hover {background-color:#05488e;}
+#loginInButton:hover {background-color:#05488e;}
.loginContentContainer {width:100%; background-color:#269ac9; margin-top:1px; height:580px;}
.loginContent {width:1000px; margin:0px auto;}
.loginLeft {width:595px; float:left;}
@@ -1628,3 +1628,156 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
span.shadowbox_news_user{ color:#3b94d6;}
a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}
+/* 新版登录注册 */
+.mr45{ margin-right:45px;}
+.mt100{ margin-top:100px;}
+.mt50{ margin-top:50px;}
+.new_login{
+ width:100%;
+ height:524px;
+ background-color:#1065bd;
+}
+.new_login_con{
+ width:1000px;
+ height:524px;
+ margin:0 auto;
+ background:url(../images/login/bg_login.jpg) 0 0 no-repeat;
+}
+.new_login_box{
+ background:#FFF;
+ width:265px;
+ padding:20px 15px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ background-color: rgba(255,255,255,0.3);
+}
+.new_login_h2{
+ font-size:18px;
+ color:#fff;
+ border-bottom:1px solid #fff;
+ font-weight:normal;
+ padding-bottom:5px;
+ margin-bottom:30px;
+}
+.new_login_h2 a{
+ font-size:12px;
+ color:#fff;
+ background:url(../images/login/icons_login.png) 0 -69px no-repeat;
+ padding-left:10px;
+}
+input.new_loggin_input{
+ width:250px;
+ height:45px;
+ background:#fff;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ padding-left:15px;
+ margin-bottom:2px;
+}
+input.new_login_users{
+ background:#fff url(../images/login/icons_login.png) 8px 9px no-repeat;
+ width:215px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ padding-left:50px;
+ margin-bottom:2px;
+}
+input.new_login_lock{
+ background:#fff url(../images/login/icons_login.png) 8px -28px no-repeat;
+ width:215px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ padding-left:50px;
+ margin-bottom:2px;
+}
+
+.new_login_form ul li{
+ 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;
+ -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_check{
+ width:15px;
+ height:15px;
+ border:1px solid #fff;
+ border-style:none;
+ margin-right:5px;
+ vertical-align: -2px;
+}
+.new_login_form label{ color:#fff;}
+.new_login_form a{ color:#fff; text-decoration:underline;}
+.new_register{
+ width:100%;
+ height:580px;
+ background-color:#1065bd;
+}
+.new_register_con{
+ width:1000px;
+ height:580px;
+ margin:0 auto;
+ background:url(../images/login/bg_register.jpg) 0 0 no-repeat;
+}
+.new_login_txt{
+ width:282px;
+ height:140px;
+ padding:30px 12px 0;
+ color:#fff;
+ margin:235px 0 0 165px;
+}
+.new_login_txt h3{
+ font-size:18px;
+ text-align:center;
+ margin-bottom:20px;
+}
+.new_login_txt p{
+ line-height:2.0;
+}
+.new_register_left{
+ margin-top:250px;
+}
diff --git a/public/stylesheets/org_custom.css b/public/stylesheets/org_custom.css
index 0bdc8a670..051eb2a97 100644
--- a/public/stylesheets/org_custom.css
+++ b/public/stylesheets/org_custom.css
@@ -1,6 +1,6 @@
/* 门户首页 */
#por_header{ width:100%; }
-.por_header_top{ width:100%; height:70px; background:#3b94d6; }
+.por_header_top{ width:100%; height:70px; background:#1065bd; }
.por_header_con{ width:1000px; margin:0 auto; height:70px; }
.por_logo{ margin-top:5px;}
.por_login li{ float:left;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index d9306fa0b..644aaee10 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -515,13 +515,13 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe
/*新个人主页框架css*/
-.navContainer {width:100%; margin:0 auto; background-color:#3b94d6;}
+.navContainer {width:100%; margin:0 auto; background-color:#1065bd;}
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
-.navHomepage {width:1000px; height:54px; background-color:#3b94d6; margin:0 auto;}
+.navHomepage {width:1000px; height:54px; background-color:#1065bd; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px; display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
-.navHomepageMenu:hover {background-color:#297fb8;}
+.navHomepageMenu:hover {background-color:#05488e;}
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; background-color:#ffffff;}
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;}