mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
fix bug with states screwing up when using deface.
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user