From 2e9e441ba1f41f3e67a276eba933cb9456072234 Mon Sep 17 00:00:00 2001 From: Andrew Spinks Date: Mon, 9 Apr 2012 10:31:47 +1000 Subject: [PATCH] fix bug with states screwing up when using deface. --- app/overrides/replace_delivery_addres.rb | 3 ++- app/views/spree/checkout/_address.html.erb | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/overrides/replace_delivery_addres.rb b/app/overrides/replace_delivery_addres.rb index 4595efabad..362e217bc0 100644 --- a/app/overrides/replace_delivery_addres.rb +++ b/app/overrides/replace_delivery_addres.rb @@ -1,4 +1,5 @@ Deface::Override.new(:virtual_path => "spree/checkout/_address", :replace => "[data-hook='shipping_fieldset_wrapper']", :partial => "spree/checkout/distributor", - :name => "drop_off_point") \ No newline at end of file + :name => "drop_off_point") + diff --git a/app/views/spree/checkout/_address.html.erb b/app/views/spree/checkout/_address.html.erb index 9a5808ee61..77c035150e 100644 --- a/app/views/spree/checkout/_address.html.erb +++ b/app/views/spree/checkout/_address.html.erb @@ -44,9 +44,6 @@

<% have_states = !@order.bill_address.country.states.empty? %> <%= bill_form.label :state, t(:state) %>*
- <% state_elements = [ bill_form.collection_select(:state_id, @order.bill_address.country.states, :id, :name, @@ -62,6 +59,9 @@ document.write("<%== state_elements %>"); <% end -%>

+ <% end %>

@@ -131,9 +131,6 @@

<% have_states = !@order.ship_address.country.states.empty? %> <%= ship_form.label :state, t(:state) %>*
- <% state_elements = [ ship_form.collection_select(:state_id, @order.ship_address.country.states, :id, :name, @@ -149,6 +146,9 @@ document.write("<%== state_elements %>"); <% end %>

+ <% end %>