|
|
|
@ -187,6 +187,61 @@
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
function showtechnical_title(identity, technical_titleField) {
|
|
|
|
|
switch (identity) {
|
|
|
|
|
|
|
|
|
|
case '0' :
|
|
|
|
|
$('#technical_title').show()
|
|
|
|
|
$('#no').hide()
|
|
|
|
|
$('#name').show()
|
|
|
|
|
$('#enterprise').hide()
|
|
|
|
|
$('#gender').show()
|
|
|
|
|
var technical_titleOptions = new Array(
|
|
|
|
|
"教授","副教授","讲师","助教");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case '1' :
|
|
|
|
|
$('#technical_title').hide()
|
|
|
|
|
$('#no').show()
|
|
|
|
|
$('#name').show()
|
|
|
|
|
$('#enterprise').hide()
|
|
|
|
|
$('#gender').show()
|
|
|
|
|
var titleOptions = new Array("");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case '2' :
|
|
|
|
|
$('#technical_title').hide()
|
|
|
|
|
$('#no').hide()
|
|
|
|
|
$('#name').hide()
|
|
|
|
|
$('#enterprise').show()
|
|
|
|
|
$('#gender').hide()
|
|
|
|
|
var titleOptions = new Array("");
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
$('#technical_title').hide()
|
|
|
|
|
$('#no').hide()
|
|
|
|
|
$('#name').show()
|
|
|
|
|
$('#enterprise').hide()
|
|
|
|
|
$('#gender').show()
|
|
|
|
|
var titleOptions = new Array("");
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
technical_titleField.options.length = 0;
|
|
|
|
|
for(var i = 0; i < technical_titleOptions.length; i++) {
|
|
|
|
|
technical_titleField.options[i]=new Option(technical_titleOptions[i],technical_titleOptions[i]);
|
|
|
|
|
/*
|
|
|
|
|
if (cityField.options[i].value==city)
|
|
|
|
|
{
|
|
|
|
|
//alert("here put City ok!");
|
|
|
|
|
document.oblogform["city"].selectedIndex = i;
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<!-- end -->
|
|
|
|
|
|
|
|
|
|
<h3><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h3>
|
|
|
|
@ -195,6 +250,33 @@
|
|
|
|
|
<%= error_messages_for 'user' %>
|
|
|
|
|
|
|
|
|
|
<div class="box tabular">
|
|
|
|
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_identity) %><span class="required"> *</span></strong></td>
|
|
|
|
|
<td class="info" style="width: 10px">
|
|
|
|
|
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
|
|
|
|
<option value="">--请选择身份--</option>
|
|
|
|
|
<option value="0"><%= l(:label_teacher) %></option>
|
|
|
|
|
<option value="1"><%= l(:label_student) %></option>
|
|
|
|
|
<option value="2"><%= l(:label_enterprise) %></option>
|
|
|
|
|
<option value="3"><%= l(:label_developer) %></option>
|
|
|
|
|
|
|
|
|
|
</select></td>
|
|
|
|
|
<td>
|
|
|
|
|
<span id = 'technical_title' style = 'display:none'>
|
|
|
|
|
<select name="technical_title" id="userTechnical_title"></select></span>
|
|
|
|
|
<span id = 'no' style = 'display:none'>
|
|
|
|
|
|
|
|
|
|
<!-- modified by fq -->
|
|
|
|
|
<% unless User.current.user_extensions.student_id.nil? %>
|
|
|
|
|
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %></span>
|
|
|
|
|
<!-- <input name="no" id="no" value=<%= "#{User.current.user_extensions.student_id}" %> placeholder="请输入学号"></span> -->
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
|
|
|
|
<!-- <input name="no" id="no" placeholder="请输入学号"></span> -->
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- end -->
|
|
|
|
|
</td></tr></table></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% if @user.auth_source_id.nil? %>
|
|
|
|
|
<p><%= f.text_field :login, :size => 25, :required => true %>
|
|
|
|
|
<em class="info"><%= l(:label_max_number) %></em></p>
|
|
|
|
@ -203,9 +285,15 @@
|
|
|
|
|
|
|
|
|
|
<p><%= f.password_field :password_confirmation, :size => 25, :required => true %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<span id = 'name' style = 'display:none'>
|
|
|
|
|
<p><%= f.text_field :firstname, :required => true %></p>
|
|
|
|
|
<p><%= f.text_field :lastname, :required => true %></p>
|
|
|
|
|
</span>
|
|
|
|
|
<span id = 'enterprise' style = 'display:none'>
|
|
|
|
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong>企业名<span class="required"> *</span></strong></td>
|
|
|
|
|
<td class="info" style="width: 10px">
|
|
|
|
|
<%= text_field_tag :enterprise_name %></td></tr></table></p>
|
|
|
|
|
</span>
|
|
|
|
|
<p><%= f.text_field :mail, :required => true %></p>
|
|
|
|
|
<p>
|
|
|
|
|
<em class="info"><%="#{l(:label_mail_attention)} "%></em></p>
|
|
|
|
@ -213,19 +301,12 @@
|
|
|
|
|
|
|
|
|
|
<!-- added by bai 增加了身份、性别和地区-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_identity) %><span class="required"> *</span></strong></td>
|
|
|
|
|
<td class="info" style="width: 10px">
|
|
|
|
|
<%= select_tag 'identity', "<option value = '0'>#{l(:label_teacher)}</option>
|
|
|
|
|
<option value = '1'>#{l(:label_student)}</option>
|
|
|
|
|
<option value = '2'>#{l(:label_enterprise)}</option>
|
|
|
|
|
<option value = '3'>#{l(:label_developer)}</option> ".html_safe %></td></tr></table></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span id = 'gender' style = 'display:none'>
|
|
|
|
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_gender) %></strong></td>
|
|
|
|
|
<td class="info" style="width: 10px">
|
|
|
|
|
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
|
|
|
|
|
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></td></tr></table></p>
|
|
|
|
|
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></td></tr></table></p></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_location) %><span class="required"> *</span></strong></td>
|
|
|
|
|
<td class="info" style="width: 80px">
|
|
|
|
|