diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 6233772f4..2e70b2454 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -109,9 +109,15 @@

- <%= l(:field_occupation) %> *<%= 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) %> *<%= 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) %> *<%= 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 %>