新注册的用户默认身份为空 编辑资料时身份是必填的
This commit is contained in:
parent
a2e2c5de3c
commit
4abb532fd4
|
@ -17,7 +17,7 @@
|
|||
<ul class="setting_left">
|
||||
<li>登录名 : <span style="color:red;">*</span></li>
|
||||
<li>邮箱 : <span style="color:red;">*</span></li>
|
||||
<li>身份 : </li>
|
||||
<li>身份 : <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) : <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) : <span style="color:red;">*</span></li>
|
||||
<li nhname="tag" nh_tag_2="true" style="display:none;">组织名 : <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>
|
||||
<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">
|
||||
<%= l(:label_account_identity_teacher) %>
|
||||
</option>
|
||||
|
@ -61,6 +64,7 @@
|
|||
<%= 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;"><%= f.text_field :lastname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %>
|
||||
|
@ -701,6 +705,11 @@
|
|||
$("#users_tb_2").click();
|
||||
<% end %>
|
||||
$('#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();
|
||||
|
|
Loading…
Reference in New Issue