Skip to content

Commit

Permalink
add form-control class to state and country selects
Browse files Browse the repository at this point in the history
  • Loading branch information
adamakhtar committed Oct 15, 2015
1 parent 308f5e6 commit 095166f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/spree/addresses_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def address_state(form, country, address_id = "b")
form.collection_select(:state_id, country.states.order(:name),
:id, :name,
{:include_blank => true},
{:class => have_states ? "required" : "hidden",
{:class => have_states ? "required form-control" : "hidden",
:disabled => !have_states}) +
form.text_field(:state_name,
:class => !have_states ? "required" : "hidden",
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/addresses/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p class="form-group" id="<%= "#{address_id}country" %>">
<%= address_form.label :country_id, Spree.t(:country) %><span class="required">*</span><br />
<span id="<%= "#{address_id}country-selection" %>">
<%= address_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required'} %>
<%= address_form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'required form-control'} %>
</span>
</p>
<% elsif field == "state" %>
Expand Down

0 comments on commit 095166f

Please sign in to comment.