<%= form.fields_for :bill_address do |bill_form| %> <%= t(:billing_address) %>

<%= bill_form.label :firstname, t(:first_name) %>*
<%= bill_form.text_field :firstname, :class => 'required' %>

<%= bill_form.label :lastname, t(:last_name) %>*
<%= bill_form.text_field :lastname, :class => 'required' %>

<% if Spree::Config[:company] %>

<%= bill_form.label :company, t(:company) %>
<%= bill_form.text_field :company %>

<% end %>

<%= bill_form.label :address1, t(:street_address) %>*
<%= bill_form.text_field :address1, :class => 'required' %>

<%= bill_form.label :address2, t(:street_address_2) %>
<%= bill_form.text_field :address2 %>

<%= bill_form.label :city, t(:city) %>*
<%= bill_form.text_field :city, :class => 'required' %>

<%= bill_form.label :country_id, t(:country) %>*
<%= bill_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %>

<% if Spree::Config[:address_requires_state] %>

<% 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, {:include_blank => true}, {:class => have_states ? 'required' : 'hidden', :disabled => !have_states}) + bill_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 %>

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

<%= bill_form.label :phone, t(:phone) %>*
<%= bill_form.text_field :phone, :class => 'required' %>

<% if Spree::Config[:alternative_billing_phone] %>

<%= bill_form.label :alternative_phone, t(:alternative_phone) %>
<%= bill_form.text_field :alternative_phone %>

<% end %> <% end %>

<%= label_tag "Ich akzeptiere die AGB" %> <%= check_box_tag "accept" %>