|
|
|
@ -78,7 +78,7 @@
|
|
|
|
|
<span id="identity_hint" style="display: none"></span>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;"><%= text_field_tag :lastname,@user.lastname+@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
|
|
|
|
|
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;"><%= text_field_tag :lastname,@user.lastname+@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %><span id="last_name_notice" class="none c_red">姓名不能为空</span>
|
|
|
|
|
|
|
|
|
|
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">
|
|
|
|
|
<% if User.current.user_extensions && User.current.user_extensions.gender && User.current.user_extensions.gender == 1 %>
|
|
|
|
@ -175,7 +175,7 @@
|
|
|
|
|
<li style="height:auto;"><textarea name="description" class="w450 h200" maxlength="255" style="resize:none;"><%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.description %></textarea></li>
|
|
|
|
|
<li style="display:none;"><%= f.select :language, :Chinese => :zh, :English => :en %></li>
|
|
|
|
|
<li class="ml2">
|
|
|
|
|
<a href="javascript:void(0);" id="my_account_form_link" class="blue_btn fl" style="background: #3b94d6; padding: 0 25px;">确定</a>
|
|
|
|
|
<a href="javascript:void(0);" id="my_account_form_link" class="blue_btn fl" onclick="my_account_form_submit();" style="background: #3b94d6; padding: 0 25px;">确定</a>
|
|
|
|
|
<input type="submit" id="my_account_form_btn" style="display:none;"/>
|
|
|
|
|
<!--<a href="javascript:void(0);" class="grey_btn ml10 fl">取消</a>-->
|
|
|
|
|
</li>
|
|
|
|
@ -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('<span style="color:red">请选择身份</span>').show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
|
|
|
|
|
$("#hint").html('<span style="color:red">单位名称必须是从下拉列表中选择的,不能手动修改</span>').show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//姓名不能为空
|
|
|
|
|
if( $("#lastname").val() == '' ){
|
|
|
|
|
$("#lastname").focus();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
|
|
|
|
|
$("#hint").html('<span style="color:red">高校(单位)名称不能为空</span>').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('<span style="color:red">请选择身份</span>').show();
|
|
|
|
|
// e.stopImmediatePropagation();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
|
|
|
|
|
// $("#hint").html('<span style="color:red">单位名称必须是从下拉列表中选择的,不能手动修改</span>').show();
|
|
|
|
|
// e.stopImmediatePropagation();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// //姓名不能为空
|
|
|
|
|
// if( $("#lastname").val() == '' ){
|
|
|
|
|
// $("#lastname").focus();
|
|
|
|
|
// $("#last_name_notice").show();
|
|
|
|
|
// e.stopImmediatePropagation();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
|
|
|
|
|
// $("#hint").html('<span style="color:red">高校(单位)名称不能为空</span>').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('<span style="color:red">请选择身份</span>').show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
|
|
|
|
|
$("#hint").html('<span style="color:red">单位名称必须是从下拉列表中选择的,不能手动修改</span>').show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//姓名不能为空
|
|
|
|
|
if( $("#lastname").val() == '' ){
|
|
|
|
|
$("#lastname").focus();
|
|
|
|
|
$("#last_name_notice").show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( $("input[name='province']").val().trim() == '' ){ //学校名字必须填写
|
|
|
|
|
$("#hint").html('<span style="color:red">高校(单位)名称不能为空</span>').show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($("#no").is(":visible") == true && $("#no").val() == ""){
|
|
|
|
|
$("#no").focus();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#my_account_form').submit();
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function g(o){return document.getElementById(o);}
|
|
|
|
|