|
|
|
@ -70,15 +70,15 @@
|
|
|
|
|
</select>
|
|
|
|
|
<span nhname="tag" nh_tag_1="true" style='display:none;'>
|
|
|
|
|
<% if !User.current.user_extensions.nil? && !User.current.user_extensions.student_id.nil? %>
|
|
|
|
|
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID),:style=>"width:127px;" %>
|
|
|
|
|
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID),:style => "width:127px;" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID),:style=>"60px" %></span>
|
|
|
|
|
<%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID), :style => "60px" %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<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" %><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;"><%= 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 %>
|
|
|
|
@ -90,6 +90,7 @@
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">
|
|
|
|
|
<!-- 基本资料页面单位审核显示 -->
|
|
|
|
|
<% if User.current.user_extensions.nil? %>
|
|
|
|
|
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
|
|
|
|
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="" placeholder=" --请选择您所属的单位--"/>
|
|
|
|
@ -98,13 +99,14 @@
|
|
|
|
|
<span id="hint" style="color: #7f7f7f;display: none"><a id="school_num" href="javascript:void(0)" style="color: red" ></a><a id="search_condition" href="javascript:void(0)"></a></span>
|
|
|
|
|
</p>
|
|
|
|
|
<!--<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>-->
|
|
|
|
|
<!-- 从业者选择单位名称 -->
|
|
|
|
|
<% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
|
|
|
|
|
<% if User.current.user_extensions.school_id.nil? %>
|
|
|
|
|
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
|
|
|
|
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
|
|
|
|
|
<% else %>
|
|
|
|
|
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text"value="<%= User.current.user_extensions.school %>" >
|
|
|
|
|
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
|
|
|
|
|
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.school.id %>" /> <!-- 单位名称的test框选中下拉列表框的id -->
|
|
|
|
|
<% end %>
|
|
|
|
|
<p class="fl ml10">
|
|
|
|
|
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->
|
|
|
|
@ -605,12 +607,15 @@
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 基本资料页面提交表单时,判断身份与单位是否合法
|
|
|
|
|
function my_account_form_submit(){
|
|
|
|
|
if($("#userIdentity").val() == -1 ) {
|
|
|
|
|
$("#identity_hint").html('<span style="color:red">请选择身份</span>').show();
|
|
|
|
|
e.stopImmediatePropagation();
|
|
|
|
|
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();
|
|
|
|
|