fix bug with states screwing up when using deface.

This commit is contained in:
Andrew Spinks
2012-04-09 10:31:47 +10:00
parent 7f5e0c406d
commit 2e9e441ba1
2 changed files with 8 additions and 7 deletions

View File

@@ -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")
:name => "drop_off_point")

View File

@@ -44,9 +44,6 @@
<p class="field" id="bstate">
<% have_states = !@order.bill_address.country.states.empty? %>
<%= bill_form.label :state, t(:state) %><span class="req">*</span><br />
<noscript>
<%= bill_form.text_field :state_name, :class => 'required' %>
</noscript>
<% state_elements = [
bill_form.collection_select(:state_id, @order.bill_address.country.states,
:id, :name,
@@ -62,6 +59,9 @@
document.write("<%== state_elements %>");
<% end -%>
</p>
<noscript>
<%= bill_form.text_field :state_name, :class => 'required' %>
</noscript>
<% end %>
<p class="field" id="bzipcode">
@@ -131,9 +131,6 @@
<p class="field" id="sstate">
<% have_states = !@order.ship_address.country.states.empty? %>
<%= ship_form.label :state, t(:state) %><span class="req">*</span><br />
<noscript>
<%= ship_form.text_field :state_name, :class => 'required' %>
</noscript>
<% state_elements = [
ship_form.collection_select(:state_id, @order.ship_address.country.states,
:id, :name,
@@ -149,6 +146,9 @@
document.write("<%== state_elements %>");
<% end %>
</p>
<noscript>
<%= ship_form.text_field :state_name, :class => 'required' %>
</noscript>
<% end %>
<p class="field" id="szipcode">