|
|
|
@ -12,8 +12,6 @@
|
|
|
|
|
);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
function get_options(value) {
|
|
|
|
|
$.ajax({
|
|
|
|
@ -21,17 +19,12 @@
|
|
|
|
|
url: '/school/get_options/' + encodeURIComponent(value),
|
|
|
|
|
data: 'text',
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
$("#province").val(value)
|
|
|
|
|
$("#schoollist").html(data);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="contextual" style="padding-right: 10px;">
|
|
|
|
|
<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
|
|
|
|
<%= call_hook(:view_my_account_contextual, :user => @user) %>
|
|
|
|
@ -39,9 +32,7 @@
|
|
|
|
|
|
|
|
|
|
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
|
|
|
|
<%= error_messages_for 'user' %>
|
|
|
|
|
|
|
|
|
|
<fieldset class="box" style="margin:10px;">
|
|
|
|
|
|
|
|
|
|
<%= labelled_form_for :user, @user,
|
|
|
|
|
:url => {:action => "account"},
|
|
|
|
|
:html => {:id => 'my_account_form',
|
|
|
|
@ -70,7 +61,6 @@
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<span id='name' style='display:none'>
|
|
|
|
|
|
|
|
|
|
<p style="width:530px;padding-left: 26px;">
|
|
|
|
|
<%= f.text_field :lastname, :required => true %>
|
|
|
|
|
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
|
|
|
@ -82,7 +72,8 @@
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<span id='enterprise' style='display:none'>
|
|
|
|
|
<p style="width:400px;padding-left: 26px;"><%= l(:label_company_name)%><%= text_field_tag :enterprise_name, @user.firstname %>
|
|
|
|
|
<p style="width:400px;padding-left: 26px;">
|
|
|
|
|
<%= l(:label_company_name)%><%= text_field_tag :enterprise_name, @user.firstname %>
|
|
|
|
|
</p>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
@ -95,10 +86,10 @@
|
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% if @user.user_extensions.gender == 0 %><!-- label_gender_male -->
|
|
|
|
|
<p style="width:400px;padding-left: 26px;">
|
|
|
|
|
<%= l(:label_gender) %>
|
|
|
|
|
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe, :class => 'gender' %>
|
|
|
|
|
</p>
|
|
|
|
|
<p style="width:400px;padding-left: 26px;">
|
|
|
|
|
<%= l(:label_gender) %>
|
|
|
|
|
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe, :class => 'gender' %>
|
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p style="width:400px;padding-left: 26px;">
|
|
|
|
|
<%= l(:label_gender) %>
|
|
|
|
@ -107,12 +98,11 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
<!-- added by Wen -->
|
|
|
|
|
|
|
|
|
|
<p style="padding-left: 26px;">
|
|
|
|
|
<% if User.current.user_extensions.school.nil? %>
|
|
|
|
|
<%= l(:field_occupation) %> <span class="required">*</span>
|
|
|
|
|
<%= l(:field_occupation) %>
|
|
|
|
|
<span class="required">*</span>
|
|
|
|
|
<input id="province" name="province" type="text" value="请单击选择省份及学校" readonly>
|
|
|
|
|
<input id="occupation" name="occupation" type="hidden"/>
|
|
|
|
|
<input id="occupation_name" type="text" readonly/>
|
|
|
|
@ -126,8 +116,7 @@
|
|
|
|
|
|
|
|
|
|
<div id="WOpenWindow">
|
|
|
|
|
<a class="modal_close" href="#"></a>
|
|
|
|
|
|
|
|
|
|
<h2>学校列表</h2>
|
|
|
|
|
<h2><%= l(:lable_school_list)%></h2>
|
|
|
|
|
|
|
|
|
|
<div class="pcontent">
|
|
|
|
|
<ul id="provincelist" class="school_list">
|
|
|
|
@ -234,39 +223,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% unless @user.user_extensions.identity == 2 %>
|
|
|
|
|
<p style="width:400px;padding-left: 26px;">
|
|
|
|
|
<%= l(:label_identity) %>
|
|
|
|
|
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
|
|
|
|
<option value=""><%= l(:label_account_identity_choose) %></option>
|
|
|
|
|
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
|
|
|
|
<option value="1"><%= l(:label_account_identity_student) %></option>
|
|
|
|
|
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
<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 => "请输入学号" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- end -->
|
|
|
|
|
</span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span style="display:none">
|
|
|
|
|
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
|
|
|
|
<option value=""><%= l(:label_account_identity_choose) %></option>
|
|
|
|
|
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
|
|
|
|
<option value="1"><%= l(:label_account_identity_student) %></option>
|
|
|
|
|
<option value="2"><%= l(:label_account_identity_enterprise) %></option>
|
|
|
|
|
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
<p style="width:400px;padding-left: 26px;">
|
|
|
|
|
<%= l(:label_identity) %>
|
|
|
|
|
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
|
|
|
|
<option value=""><%= l(:label_account_identity_choose) %></option>
|
|
|
|
|
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
|
|
|
|
<option value="1"><%= l(:label_account_identity_student) %></option>
|
|
|
|
|
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
<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 => "请输入学号" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- end -->
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
<% else %>
|
|
|
|
|
<p>
|
|
|
|
|
<span style="display:none">
|
|
|
|
|
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
|
|
|
|
<option value=""><%= l(:label_account_identity_choose) %></option>
|
|
|
|
|
<option value="0"><%= l(:label_account_identity_teacher) %></option>
|
|
|
|
|
<option value="1"><%= l(:label_account_identity_student) %></option>
|
|
|
|
|
<option value="2"><%= l(:label_account_identity_enterprise) %></option>
|
|
|
|
|
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
|
|
|
|
</select>
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|