% address_id = address_type.chars.first %>
>
<%= form.label :firstname, t('spree.first_name') %>*
<%= form.text_field :firstname, class: 'required', autocomplete: address_type + ' given-name', required: true, autofocus: true %>
>
<%= form.label :lastname, t('spree.last_name') %>
<%= form.text_field :lastname, autocomplete: address_type + ' family-name' %>
>
<%= form.label :company, t('spree.company') %>
<%= form.text_field :company, autocomplete: address_type + ' organization' %>
>
<%= form.label :address1, t('spree.street_address') %>*
<%= form.text_field :address1, class: 'required', autocomplete: address_type + ' address-line1', required: true %>
>
<%= form.label :address2, I18n.t('spree.street_address_2') %>
<%= form.text_field :address2, autocomplete: address_type + ' address-line2' %>
>
<%= form.label :city, t('spree.city') %>*
<%= form.text_field :city, class: 'required', autocomplete: address_type + ' address-level2', required: true %>
>
<%= form.label :country_id, t('spree.country') %>*
>
<%= form.collection_select :country_id, available_countries, :id, :name, {},
class: 'required',
autocomplete: address_type + ' country-name',
required: true
%>
>
<% have_states = !address.country.states.empty? %>
<%= form.label :state, t('spree.state') %>>*
>
<%= form.label :zipcode, t('spree.zip') %><% if address.require_zipcode? %>*<% end %>
<%= form.text_field :zipcode, class: "#{'required' if address.require_zipcode?}", autocomplete: address_type + ' postal-code', required: true %>
>
<%= form.label :phone, t('spree.phone') %><% if address.require_phone? %>*<% end %>
<% phone_hash = address.require_phone? ? { class: 'required', required: true } : {} %>
<%= form.phone_field :phone, phone_hash.merge({ autocomplete: address_type + ' home tel' }) %>
>
<%= form.label :alternative_phone, t('spree.alternative_phone') %>
<%= form.phone_field :alternative_phone, autocomplete: address_type + ' tel'%>