注册时学校选择的小调整
This commit is contained in:
parent
59d705b33c
commit
f8c6d7d77e
|
@ -109,9 +109,15 @@
|
|||
|
||||
|
||||
<p style="width:357px;padding-left: 26px;">
|
||||
<%= l(:field_occupation) %> <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)" %>
|
||||
<% unless User.current.user_extensions.school_id.nil? %>
|
||||
<%= l(:field_occupation) %> <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" %>
|
||||
<%= select_tag "occupation", options_for_select([[User.current.user_extensions.school.name, User.current.user_extensions.school.id]]) %>
|
||||
<% else %>
|
||||
<%= l(:field_occupation) %> <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" %>
|
||||
<% end %>
|
||||
<!-- <input id="occupation" readonly />-->
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in New Issue