diff --git a/frontend/app/views/spree/address/_form.html.erb b/frontend/app/views/spree/address/_form.html.erb index f2d2d32e226..2e10f135396 100644 --- a/frontend/app/views/spree/address/_form.html.erb +++ b/frontend/app/views/spree/address/_form.html.erb @@ -2,34 +2,43 @@
>

> <%= form.label :firstname, Spree.t(:first_name) %>*
- <%= form.text_field :firstname, :class => 'required' %> + <%= form.text_field :firstname, class: 'required', autocomplete: address_type + ' given-name' %>

+

> <%= form.label :lastname, Spree.t(:last_name) %>*
- <%= form.text_field :lastname %> + <%= form.text_field :lastname, autocomplete: address_type + ' family-name' %>

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

> <%= form.label :company, Spree.t(:company) %>
- <%= form.text_field :company %> + <%= form.text_field :company, autocomplete: address_type + ' organization' %>

<% end %> +

> <%= form.label :address1, Spree.t(:street_address) %>*
- <%= form.text_field :address1, :class => 'required' %> + <%= form.text_field :address1, class: 'required', autocomplete: address_type + ' address-line1' %>

+

> <%= form.label :address2, Spree.t(:street_address_2) %>
- <%= form.text_field :address2 %> + <%= form.text_field :address2, autocomplete: address_type + ' address-line2' %>

+

> <%= form.label :city, Spree.t(:city) %>*
- <%= form.text_field :city, :class => 'required' %> + <%= form.text_field :city, class: 'required', autocomplete: address_type + ' address-level2' %>

+

> <%= form.label :country_id, Spree.t(:country) %>*
> - <%= form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %> + <%= form.collection_select :country_id, available_countries, :id, :name, {}, + class: 'required', + autocomplete: address_type + ' country-name' + %>

@@ -46,7 +55,8 @@ { class: have_states ? 'required' : '', style: have_states ? '' : 'display: none;', - disabled: !have_states + disabled: !have_states, + autocomplete: address_type + ' address-level1' }) %> <%= @@ -54,28 +64,31 @@ :state_name, class: !have_states ? 'required' : '', style: have_states ? 'display: none;' : '', - disabled: have_states + disabled: have_states, + autocomplete: address_type + ' address-level1' ) %>

<% end %>

> <%= form.label :zipcode, Spree.t(:zip) %><% if address.require_zipcode? %>*<% end %>
- <%= form.text_field :zipcode, :class => "#{'required' if address.require_zipcode?}" %> + <%= form.text_field :zipcode, class: "#{'required' if address.require_zipcode?}", autocomplete: address_type + ' postal-code' %>

+

> <%= form.label :phone, Spree.t(:phone) %><% if address.require_phone? %>*<% end %>
- <%= form.phone_field :phone, :class => "#{'required' if address.require_phone?}" %> + <%= form.phone_field :phone, class: "#{'required' if address.require_phone?}", autocomplete: address_type + ' home tel' %>

+ <% if Spree::Config[:alternative_shipping_phone] %>

> <%= form.label :alternative_phone, Spree.t(:alternative_phone) %>
- <%= form.phone_field :alternative_phone %> + <%= form.phone_field :alternative_phone, autocomplete: address_type + ' tel' %>

<% end %>