From 735f920e9de6521bdf6001bfe3b431905908a000 Mon Sep 17 00:00:00 2001 From: Wen Date: Wed, 23 Apr 2014 11:10:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=A1=B5=E9=9D=A2=E5=AD=A6?= =?UTF-8?q?=E6=A0=A1=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=96=87=E6=9C=AC=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 2e70b2454..13a6ec43d 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -109,14 +109,21 @@

- <% unless User.current.user_extensions.school_id.nil? %> + <% unless User.current.user_extensions.school.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", 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 %>

@@ -133,7 +140,9 @@