+ <%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.same_as?(@order.ship_address)) %>
+ <%= label_tag :order_use_billing, t(:use_billing_address), :id => 'use_billing' %>
+
+
+
+ <%= ship_form.label :firstname, t(:first_name) %>*
+ <%= ship_form.text_field :firstname, :class => 'required' %>
+
+
+ <%= ship_form.label :lastname, t(:last_name) %>*
+ <%= ship_form.text_field :lastname, :class => 'required' %>
+
+ <% if Spree::Config[:company] %>
+
+ <%= ship_form.label :company, t(:company) %>
+ <%= ship_form.text_field :company %>
+
+ <% end %>
+
+ <%= ship_form.label :address1, t(:street_address) %>*
+ <%= ship_form.text_field :address1, :class => 'required' %>
+
+
+ <%= ship_form.label :address2, t(:street_address_2) %>
+ <%= ship_form.text_field :address2 %>
+
+
+
+ <%= ship_form.label :city, t(:city) %>*
+ <%= ship_form.text_field :city, :class => 'required' %>
+
+
+
+ <%= ship_form.label :country_id, t(:country) %>*
+
+ <%= ship_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %>
+
+
+
+ <% if Spree::Config[:address_requires_state] %>
+
+ <% 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,
+ {:include_blank => true},
+ {:class => have_states ? 'required' : 'hidden',
+ :disabled => !have_states}) +
+ ship_form.text_field(:state_name,
+ :class => !have_states ? 'required' : 'hidden',
+ :disabled => have_states)
+ ].join.gsub('"', "'").gsub("\n", "")
+ %>
+ <%= javascript_tag do -%>
+ document.write("<%== state_elements %>");
+ <% end %>
+
+ <% end %>
+
+
+ <%= ship_form.label :zipcode, t(:zip) %>*
+ <%= ship_form.text_field :zipcode, :class => 'required' %>
+
+
+ <%= ship_form.label :phone, t(:phone) %>*
+ <%= ship_form.text_field :phone, :class => 'required' %>
+
+ <% if Spree::Config[:alternative_shipping_phone] %>
+
+ <%= ship_form.label :alternative_phone, t(:alternative_phone) %>
+ <%= ship_form.text_field :alternative_phone %>
+
+ <% end %>
+
+ <% end %>
+