From a466fdd64e415c93632913878dd733275c62fb20 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Thu, 25 Aug 2016 15:29:04 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E4=BF=AE=E6=94=B9=E5=9F=BA?=
=?UTF-8?q?=E6=9C=AC=E8=B5=84=E6=96=99=EF=BC=9A=E7=94=B3=E8=AF=B7=E5=8D=95?=
=?UTF-8?q?=E4=BD=8D=E7=82=B9=E5=87=BB=E7=A1=AE=E5=AE=9A=E5=90=8E=EF=BC=8C?=
=?UTF-8?q?=E8=BF=9B=E5=85=A5=E4=B8=BB=E9=A1=B5=E9=9D=A2=EF=BC=9B=E6=8F=90?=
=?UTF-8?q?=E9=97=AE=E6=8C=89=E9=92=AE=E4=B8=8D=E5=8F=AF=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../layouts/_forbidden_new_feedback.html.erb | 40 +++++++
app/views/layouts/new_base_user_show.html.erb | 2 +-
app/views/my/_apply_add_school.html.erb | 34 +++++-
app/views/my/account.html.erb | 108 ++++++++++++------
4 files changed, 145 insertions(+), 39 deletions(-)
create mode 100644 app/views/layouts/_forbidden_new_feedback.html.erb
diff --git a/app/views/layouts/_forbidden_new_feedback.html.erb b/app/views/layouts/_forbidden_new_feedback.html.erb
new file mode 100644
index 000000000..03c9855f9
--- /dev/null
+++ b/app/views/layouts/_forbidden_new_feedback.html.erb
@@ -0,0 +1,40 @@
+<%= javascript_include_tag "feedback" %>
+
+
diff --git a/app/views/layouts/new_base_user_show.html.erb b/app/views/layouts/new_base_user_show.html.erb
index 37354d8d8..b49df8829 100644
--- a/app/views/layouts/new_base_user_show.html.erb
+++ b/app/views/layouts/new_base_user_show.html.erb
@@ -233,7 +233,7 @@
<%= yield %>
- <%= render :partial => 'layouts/new_feedback' %>
+ <%= render :partial => 'layouts/forbidden_new_feedback' %>
<%= render :partial => 'layouts/footer_show' %>
diff --git a/app/views/my/_apply_add_school.html.erb b/app/views/my/_apply_add_school.html.erb
index c7b08e305..806017a00 100644
--- a/app/views/my/_apply_add_school.html.erb
+++ b/app/views/my/_apply_add_school.html.erb
@@ -60,7 +60,7 @@
-
+
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 71694da60..2e14f493b 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -78,7 +78,7 @@
- <%= text_field_tag :lastname,@user.lastname+@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
+ <%= text_field_tag :lastname,@user.lastname+@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>姓名不能为空
<% if User.current.user_extensions && User.current.user_extensions.gender && User.current.user_extensions.gender == 1 %>
@@ -175,7 +175,7 @@
<%= f.select :language, :Chinese => :zh, :English => :en %>
- 确定
+ 确定
@@ -560,44 +560,80 @@
$("#users_tb_2").click();
<% end %>
- $('#my_account_form_link').on("click",(function(e){
- //$('#my_account_form_link').click(function(e){
- if($("#userIdentity").val() == -1 ) {
- $("#identity_hint").html('请选择身份').show();
- e.stopImmediatePropagation();
- return;
- }
- if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
- $("#hint").html('单位名称必须是从下拉列表中选择的,不能手动修改').show();
- e.stopImmediatePropagation();
- return;
- }
-
- //姓名不能为空
- if( $("#lastname").val() == '' ){
- $("#lastname").focus();
- e.stopImmediatePropagation();
- return;
- }
-
- if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
- $("#hint").html('高校(单位)名称不能为空').show();
- e.stopImmediatePropagation();
- return;
- }
-
- if($("#no").is(":visible") == true && $("#no").val() == ""){
- $("#no").focus();
- e.stopImmediatePropagation();
- return;
- }
-
- $('#my_account_form_btn').click();
- }));
+// $('#my_account_form_link').on("click",(function(e){
+// //$('#my_account_form_link').click(function(e){
+// if($("#userIdentity").val() == -1 ) {
+// $("#identity_hint").html('请选择身份').show();
+// e.stopImmediatePropagation();
+// return;
+// }
+// if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
+// $("#hint").html('单位名称必须是从下拉列表中选择的,不能手动修改').show();
+// e.stopImmediatePropagation();
+// return;
+// }
+//
+// //姓名不能为空
+// if( $("#lastname").val() == '' ){
+// $("#lastname").focus();
+// $("#last_name_notice").show();
+// e.stopImmediatePropagation();
+// return;
+// }
+//
+// if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
+// $("#hint").html('高校(单位)名称不能为空').show();
+// e.stopImmediatePropagation();
+// return;
+// }
+//
+// if($("#no").is(":visible") == true && $("#no").val() == ""){
+// $("#no").focus();
+// e.stopImmediatePropagation();
+// return;
+// }
+//
+// $('#my_account_form').submit();
+// }));
$('#my_password_form_link').click(function(){
$('#my_password_form_btn').click();
});
});
+
+function my_account_form_submit(){
+ if($("#userIdentity").val() == -1 ) {
+ $("#identity_hint").html('请选择身份').show();
+ e.stopImmediatePropagation();
+ return;
+ }
+ if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
+ $("#hint").html('单位名称必须是从下拉列表中选择的,不能手动修改').show();
+ e.stopImmediatePropagation();
+ return;
+ }
+
+ //姓名不能为空
+ if( $("#lastname").val() == '' ){
+ $("#lastname").focus();
+ $("#last_name_notice").show();
+ e.stopImmediatePropagation();
+ return;
+ }
+
+ if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
+ $("#hint").html('高校(单位)名称不能为空').show();
+ e.stopImmediatePropagation();
+ return;
+ }
+
+ if($("#no").is(":visible") == true && $("#no").val() == ""){
+ $("#no").focus();
+ e.stopImmediatePropagation();
+ return;
+ }
+
+ $('#my_account_form').submit();
+}