新注册的用户默认身份为空 编辑资料时身份是必填的

dev_xiangzheng
cxt 10 years ago
parent a2e2c5de3c
commit 4abb532fd4

@ -17,7 +17,7 @@
<ul class="setting_left"> <ul class="setting_left">
<li>登录名&nbsp;:&nbsp;<span style="color:red;">*</span></li> <li>登录名&nbsp;:&nbsp;<span style="color:red;">*</span></li>
<li>邮箱&nbsp;:&nbsp;<span style="color:red;">*</span></li> <li>邮箱&nbsp;:&nbsp;<span style="color:red;">*</span></li>
<li>身份&nbsp;:&nbsp;</li> <li>身份&nbsp;:&nbsp;<span style="color:red;">*</span></li>
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">姓(First Name)&nbsp;:&nbsp;<span style="color:red;">*</span></li> <li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">姓(First Name)&nbsp;:&nbsp;<span style="color:red;">*</span></li>
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">名(Last Name)&nbsp;:&nbsp;<span style="color:red;">*</span></li> <li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">名(Last Name)&nbsp;:&nbsp;<span style="color:red;">*</span></li>
<li nhname="tag" nh_tag_2="true" style="display:none;">组织名&nbsp;:&nbsp;<span style="color:red;">*</span></li> <li nhname="tag" nh_tag_2="true" style="display:none;">组织名&nbsp;:&nbsp;<span style="color:red;">*</span></li>
@ -34,7 +34,10 @@
<li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%></li> <li><%= f.text_field :mail,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210"%></li>
<li> <li>
<select onchange="showtechnical_title(this.value);" name="identity" id="userIdentity" class="location" class="w70" style="height:28px;margin-left:2px;"> <select onchange="showtechnical_title(this.value);" required = true, nh_required="1" name="identity" id="userIdentity" class="location" class="w70" style="height:28px;margin-left:2px;">
<option value="-1">
<%= l(:label_account_identity_choose) %>
</option>
<option value="0"> <option value="0">
<%= l(:label_account_identity_teacher) %> <%= l(:label_account_identity_teacher) %>
</option> </option>
@ -61,6 +64,7 @@
<%= 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 %> <% end %>
</span> </span>
<span id="identity_hint" style="display: none"></span>
</li> </li>
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;"><%= f.text_field :lastname,: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;"><%= f.text_field :lastname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
@ -701,6 +705,11 @@
$("#users_tb_2").click(); $("#users_tb_2").click();
<% end %> <% end %>
$('#my_account_form_link').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不对的话 if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
$("#hint").html('<span style="color:red">学校必须是从下拉列表中选择的,不能手动修改</span>').show(); $("#hint").html('<span style="color:red">学校必须是从下拉列表中选择的,不能手动修改</span>').show();
e.stopImmediatePropagation(); e.stopImmediatePropagation();

Loading…
Cancel
Save