注册时学校选择的小调整

This commit is contained in:
Wen 2014-04-23 09:36:42 +08:00
parent 59d705b33c
commit f8c6d7d77e
1 changed files with 8 additions and 2 deletions

View File

@ -109,9 +109,15 @@
<p style="width:357px;padding-left: 26px;"> <p style="width:357px;padding-left: 26px;">
<% unless User.current.user_extensions.school_id.nil? %>
<%= l(:field_occupation) %>&nbsp;<span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province, User.current.user_extensions.school.province), :onchange => "get_options(this.value)" %>
<%= select_tag "occupation", options_for_select([[User.current.user_extensions.school.name, User.current.user_extensions.school.id]]) %>
<% else %>
<%= l(:field_occupation) %>&nbsp;<span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onchange => "get_options(this.value)" %> <%= l(:field_occupation) %>&nbsp;<span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onchange => "get_options(this.value)" %>
<%= select_tag "occupation" %> <%= select_tag "occupation" %>
<% end %>
<!-- <input id="occupation" readonly />--> <!-- <input id="occupation" readonly />-->
</p> </p>