0
= select_tag(:country_id, '<option></option>'+options_from_collection_for_select(Country.find_countries_with_metros, "id", "name", selected_country), {:style => "width:100px"})
0
- = "<br />"+"State:".l+" <br />" + select_tag(:state_id, '<option></option>'+options_from_collection_for_select(State.find(:all), "id", "name", (selected_state rescue nil)), {:style => "width:100px", :disabled => states.empty? } )
0
+ = select_tag(:state_id, '<option></option>' + options_from_collection_for_select(states, "id", "name", (selected_state rescue nil)), {:style => "width:100px", :disabled => states.empty? })
0
= image_tag 'spinner.gif', :plugin => 'community_engine', :style => 'display:none;'
0
- = "<br />" + "Metro Area:".l + "<br />" + select_tag(:metro_area_id, options_from_collection_for_select(metro_areas, "id", "name", (selected_metro_area rescue nil)), {:style => "width:100px", :disabled => metro_areas.empty? } )
0
+ = select_tag(:metro_area_id, options_from_collection_for_select(metro_areas, "id", "name", (selected_metro_area rescue nil)), {:style => "width:100px", :disabled => metro_areas.empty? })
0
= image_tag 'spinner.gif', :plugin => 'community_engine', :style => 'display:none;'
0
-= observe_field "state_id", {:url => {:controller => 'users', :action => 'metro_area_update'}, :with => "state_id", :loading => "$$('span#location_chooser img')[0].show();", 500 => "alert('Sorry, there was an error.'.l); return false", :update => "location_chooser"}
0
-= observe_field "country_id", {:url => {:controller => 'users', :action => 'metro_area_update'}, :with => "country_id", :loading => "$$('span#location_chooser img')[0].show();", 500 => "alert('Sorry, there was an error.'.l); return false", :update => "location_chooser"}
0
+= observe_field("state_id", {:url => {:controller => 'users', :action => 'metro_area_update'}, |
0
+ :with => "'state_id=' + $('state_id').value + '&country_id=' + $('country_id').value", |
0
+ :loading => "$$('span#location_chooser img')[0].show();", |
0
+ 500 => "alert('Sorry, there was an error.'.l); return false", |
0
+ :update => "location_chooser"}) |
0
+= observe_field("country_id", {:url => {:controller => 'users', :action => 'metro_area_update'}, |
0
+ :with => "country_id", |
0
+ :loading => "$$('span#location_chooser img')[0].show();", |
0
+ 500 => "alert('Sorry, there was an error.'.l); return false", |
0
+ :update => "location_chooser"}) |
Comments
No one has commented yet.