<%= form.fields_for :bill_address, :html => {:class => "form-horizontal"} do |bill_form| %> <%= t("shipping_address")%>
<%= bill_form.label :firstname, t(:first_name), :class => "control-label" %>
<%= bill_form.text_field :firstname %>
<%= bill_form.label :lastname, t(:last_name), :class => "control-label" %>
<%= bill_form.text_field :lastname %>
<%= bill_form.label :address1, t(:street_address), :class => "control-label" %>
<%= bill_form.text_field :address1 %>
<%= bill_form.label :address2, t(:street_address_2), :class => "control-label" %>
<%= bill_form.text_field :address2 %>
<%= bill_form.label :city, t(:city), :class => "control-label" %>
<%= bill_form.text_field :city %>
<% if Spree::Config[:address_requires_state] %>
<%= bill_form.label :state, t(:state), :class => "control-label" %>
<% have_states = !@order.bill_address.country.states.empty? %> <% state_elements = [ bill_form.collection_select(:state_id, @order.bill_address.country.states, :id, :name, {:include_blank => true}, {:style => have_states ? "" : "display:none", :disabled => !have_states}) + bill_form.text_field(:state_name, :style => !have_states ? "" : "display:none", :disabled => have_states) ].join.gsub('"', "'").gsub("\n", "") %>
<% end %>
<%= bill_form.label :zipcode, t(:zip), :class => "control-label" %>
<%= bill_form.text_field :zipcode %>
<%= bill_form.label :country_id, t(:country), :class => "control-label" %>
<%= bill_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %>
<%= bill_form.label :phone, t(:phone), :class => "control-label" %>
<%= bill_form.text_field :phone %>
<% if Spree::Config[:alternative_billing_phone] %>
<%= bill_form.label :alternative_phone, t(:alternative_phone), :class => "control-label" %>
<%= bill_form.text_field :alternative_phone %>
<% end %> <% end %>
<% #платежный адрес и адрес доставки один и тот же, кому нужны отдельные поля - делайте сами :) %>
<%= form.fields_for :ship_address do |ship_form| %> <%= t("shipping_address")%>

<%= 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' %>*

<%= 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' %>*

<% 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.bill_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", "") %> *

<% end %>

<%= ship_form.label :zipcode, t(:zip) %> <%= ship_form.text_field :zipcode, :class => 'required' %>*

<%= ship_form.label :country_id, t(:country) %> <%= ship_form.collection_select :country_id, available_countries, :id, :name, {}, {: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 %>