spree_frontend 3.0.10 → 3.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/spree/frontend.js +3 -0
  4. data/app/assets/javascripts/spree/frontend/checkout.js.coffee +12 -7
  5. data/app/assets/javascripts/spree/frontend/checkout/payment.js.coffee +5 -3
  6. data/app/assets/javascripts/spree/frontend/product.js.coffee +11 -4
  7. data/app/assets/stylesheets/spree/frontend.css +0 -1
  8. data/app/assets/stylesheets/spree/frontend/frontend_bootstrap.css.scss +2 -2
  9. data/app/controllers/spree/checkout_controller.rb +17 -1
  10. data/app/controllers/spree/home_controller.rb +1 -1
  11. data/app/controllers/spree/orders_controller.rb +4 -2
  12. data/app/controllers/spree/products_controller.rb +7 -4
  13. data/app/controllers/spree/store_controller.rb +23 -18
  14. data/app/controllers/spree/taxons_controller.rb +1 -6
  15. data/app/helpers/spree/frontend_helper.rb +3 -2
  16. data/app/helpers/spree/taxons_helper.rb +3 -2
  17. data/app/views/spree/address/_form.html.erb +28 -15
  18. data/app/views/spree/checkout/_payment.html.erb +3 -2
  19. data/app/views/spree/checkout/_summary.html.erb +7 -0
  20. data/app/views/spree/checkout/edit.html.erb +3 -1
  21. data/app/views/spree/checkout/payment/_gateway.html.erb +13 -5
  22. data/app/views/spree/checkout/payment/_storecredit.html.erb +16 -0
  23. data/app/views/spree/payments/_payment.html.erb +2 -0
  24. data/app/views/spree/products/_cart_form.html.erb +24 -15
  25. data/app/views/spree/products/_taxons.html.erb +7 -11
  26. data/app/views/spree/products/show.html.erb +8 -6
  27. data/app/views/spree/shared/_filters.html.erb +1 -1
  28. data/app/views/spree/shared/_header.html.erb +1 -1
  29. data/app/views/spree/shared/_nav_bar.html.erb +1 -1
  30. data/app/views/spree/shared/_order_details.html.erb +6 -6
  31. data/app/views/spree/shared/_products.html.erb +12 -14
  32. data/app/views/spree/shared/forbidden.html.erb +0 -0
  33. data/config/routes.rb +15 -19
  34. data/spec/controllers/controller_helpers_spec.rb +102 -6
  35. data/spec/controllers/spree/checkout_controller_spec.rb +7 -0
  36. data/spec/features/checkout_spec.rb +223 -165
  37. data/spec/features/checkout_unshippable_spec.rb +1 -1
  38. data/spec/features/microdata_spec.rb +0 -0
  39. data/spec/features/products_spec.rb +79 -7
  40. data/spec/helpers/frontend_helper_spec.rb +16 -0
  41. data/spec/spec_helper.rb +1 -0
  42. metadata +13 -10
  43. data/CHANGELOG.md +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36132541fc4c24b3a7c39be34f76b10348e1be01
4
- data.tar.gz: f66b03dd73386f46a4d29835abdf11c96d7e6ed2
3
+ metadata.gz: 476c86ca526f2cbbaa444efe63433692a4b1e85a
4
+ data.tar.gz: 4c266c5c163e900eb963520eb45b8ece0419f1d2
5
5
  SHA512:
6
- metadata.gz: bcb2b4b6939b7c309f289da9dc7a9e7b40e968b98d4cc06c3ba147b68bfd75b2d46c44c88bc4c2364ba61f46e08141c800beea53b20040ba58bfa320b03ae75b
7
- data.tar.gz: bb896bec91bb4b943062aa420c91e787865c7ae8cc57f31ec84b3d58615247632a5b5372edfe6b380e59cc3420d0b7a71fdaae65d38671b4f6ee2caf4269ae57
6
+ metadata.gz: 40324361f62b2e6b5c932596e18293106b1cbcead6ccefbe6ffb4a9137b03b8c98625ebc14b4f54c72606bae952aa1076f9101f2cb7d45fc452baad531b0d22b
7
+ data.tar.gz: 40b9d62c3b995eed1223c5c5667ff7f7273958cb25e2cd57753ba814e5c7a211d71866f511011ca000f5327f64982f5c9312d039a2ce1f2ecb7306180b2c6d27
data/README.md CHANGED
@@ -29,7 +29,7 @@ This stays as closely to the original spree frontend markup as possible. Helper
29
29
  Customizing
30
30
  -------
31
31
 
32
- Override the stylesheet to `apps/assets/stylesheets/spree/frontend/frontend_bootstrap.css.scss`. Use this as your base stylesheet and edit as required.
32
+ Override the stylesheet to `vendor/assets/stylesheets/spree/frontend/frontend_bootstrap.css.scss`. Use this as your base stylesheet and edit as required.
33
33
 
34
34
  To style your spree store just override the bootstrap 3 variables. The full list of bootstrap variables can be found [here](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss). You can override these by simply redefining the variable before the `@import` directive.
35
35
  For example:
@@ -1,6 +1,9 @@
1
1
  //= require bootstrap-sprockets
2
+ //= require jquery.payment
2
3
  //= require jquery.validate/jquery.validate.min
3
4
  //= require spree
4
5
  //= require spree/frontend/cart
5
6
  //= require spree/frontend/checkout
7
+ //= require spree/frontend/checkout/address
8
+ //= require spree/frontend/checkout/payment
6
9
  //= require spree/frontend/product
@@ -1,11 +1,16 @@
1
- //= require jquery.payment
2
- //= require_self
3
- //= require spree/frontend/checkout/address
4
- //= require spree/frontend/checkout/payment
5
-
6
1
  Spree.disableSaveOnClick = ->
7
- ($ 'form.edit_order').submit ->
8
- ($ this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass 'disabled'
2
+ ($ 'form.edit_order').on('submit', (e) ->
3
+ if (($ this).data('submitted') == true)
4
+ # Previously submitted, don't submit again
5
+ e.preventDefault()
6
+ else
7
+ # Mark it so that the next submit gets ignored
8
+ ($ this).data('submitted', true)
9
+ ($ this).find(':submit, :image').removeClass('primary').addClass 'disabled'
10
+ )
11
+
12
+ Spree.enableSave = ->
13
+ ($ 'form.edit_order').data('submitted', false).find(':submit, :image').attr('disabled', false).addClass('primary').removeClass 'disabled'
9
14
 
10
15
  Spree.ready ($) ->
11
16
  Spree.Checkout = {}
@@ -40,7 +40,7 @@ Spree.ready ($) ->
40
40
  # i.e. if user enters invalid data
41
41
  ($ 'input[type="radio"]:checked').click()
42
42
 
43
- $('#checkout_form_payment').submit ->
43
+ $('#checkout_form_payment').submit (event) ->
44
44
  # Coupon code application may take a number of seconds.
45
45
  # Informing the user that this is happening is a good way to indicate some progress to them.
46
46
  # In addition to this, if the coupon code FAILS then they don't lose their just-entered payment data.
@@ -65,14 +65,16 @@ Spree.ready ($) ->
65
65
  async: false,
66
66
  method: "PUT",
67
67
  url: url,
68
- success: (data) ->
68
+ success: (data) =>
69
69
  coupon_code_field.val('')
70
70
  coupon_status.addClass("alert-success").html("Coupon code applied successfully.")
71
+ @submit()
71
72
  return true
72
73
  error: (xhr) ->
73
74
  handler = JSON.parse(xhr.responseText)
74
75
  coupon_status.addClass("alert-error").html(handler["error"])
75
- $('.continue').attr('disabled', false)
76
+ Spree.enableSave()
77
+ event.preventDefault()
76
78
  return false
77
79
  })
78
80
 
@@ -33,15 +33,22 @@ Spree.ready ($) ->
33
33
  Spree.updateVariantPrice = (variant) ->
34
34
  variantPrice = variant.data('price')
35
35
  ($ '.price.selling').text(variantPrice) if variantPrice
36
+
37
+ Spree.disableCartForm = (variant) ->
38
+ inStock = variant.data('in-stock')
39
+ $('#add-to-cart-button').attr('disabled', !inStock)
40
+
36
41
  radios = ($ '#product-variants input[type="radio"]')
37
42
 
38
43
  if radios.length > 0
39
44
  selectedRadio = ($ '#product-variants input[type="radio"][checked="checked"]')
40
45
  Spree.showVariantImages selectedRadio.attr('value')
41
46
  Spree.updateVariantPrice selectedRadio
47
+ Spree.disableCartForm selectedRadio
42
48
 
43
- Spree.addImageHandlers()
49
+ radios.click (event) ->
50
+ Spree.showVariantImages @value
51
+ Spree.updateVariantPrice ($ this)
52
+ Spree.disableCartForm ($ this)
44
53
 
45
- radios.click (event) ->
46
- Spree.showVariantImages @value
47
- Spree.updateVariantPrice ($ this)
54
+ Spree.addImageHandlers()
@@ -2,5 +2,4 @@
2
2
  * This is a manifest file that includes stylesheets for spree_frontend
3
3
  *= require spree/frontend/frontend_bootstrap
4
4
  *= require_self
5
- *= require_tree .
6
5
  */
@@ -1,4 +1,4 @@
1
- //Add your custom bootstrap variables here, see https://github.com/twbs/bootstrap-sass/blob/master/vendor/assets/stylesheets/bootstrap/_variables.scss for full list of variables.
1
+ //Add your custom bootstrap variables here, see https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss for full list of variables.
2
2
 
3
3
  @import "bootstrap-sprockets";
4
4
  @import "variables";
@@ -19,7 +19,7 @@
19
19
  margin-bottom: 10px;
20
20
 
21
21
  img {
22
- width: 306px;
22
+ width: 100%;
23
23
  }
24
24
  }
25
25
 
@@ -18,6 +18,7 @@ module Spree
18
18
  before_action :apply_coupon_code
19
19
 
20
20
  before_action :setup_for_current_state
21
+ before_action :add_store_credit_payments, only: [:update]
21
22
 
22
23
  helper 'spree/orders'
23
24
 
@@ -71,7 +72,7 @@ module Spree
71
72
  def ensure_valid_state
72
73
  if @order.state != correct_state && !skip_state_validation?
73
74
  flash.keep
74
- @order.state = correct_state
75
+ @order.update_column(:state, correct_state)
75
76
  redirect_to checkout_state_path(@order.state)
76
77
  end
77
78
  end
@@ -163,6 +164,21 @@ module Spree
163
164
  end
164
165
  end
165
166
 
167
+ def add_store_credit_payments
168
+ if params.has_key?(:apply_store_credit)
169
+ @order.add_store_credit_payments
170
+
171
+ # Remove other payment method parameters.
172
+ params[:order].delete(:payments_attributes)
173
+ params.delete(:payment_source)
174
+
175
+ # Return to the Payments page if additional payment is needed.
176
+ if @order.payments.valid.sum(:amount) < @order.total
177
+ redirect_to checkout_state_path(@order.state) and return
178
+ end
179
+ end
180
+ end
181
+
166
182
  def rescue_from_spree_gateway_error(exception)
167
183
  flash.now[:error] = Spree.t(:spree_gateway_error_flash_for_checkout)
168
184
  @order.errors.add(:base, exception.message)
@@ -5,7 +5,7 @@ module Spree
5
5
 
6
6
  def index
7
7
  @searcher = build_searcher(params.merge(include_images: true))
8
- @products = @searcher.retrieve_products
8
+ @products = @searcher.retrieve_products.includes(:possible_promotions)
9
9
  @taxonomies = Spree::Taxonomy.includes(root: :children)
10
10
  end
11
11
  end
@@ -10,7 +10,7 @@ module Spree
10
10
  skip_before_action :verify_authenticity_token, only: [:populate]
11
11
 
12
12
  def show
13
- @order = Order.find_by_number!(params[:id])
13
+ @order = Order.includes(line_items: [variant: [:option_values, :images, :product]], bill_address: :state, ship_address: :state).find_by_number!(params[:id])
14
14
  end
15
15
 
16
16
  def update
@@ -32,7 +32,9 @@ module Spree
32
32
 
33
33
  # Shows the current incomplete order from the session
34
34
  def edit
35
- @order = current_order || Order.incomplete.find_or_initialize_by(guest_token: cookies.signed[:guest_token])
35
+ @order = current_order || Order.incomplete.
36
+ includes(line_items: [variant: [:images, :option_values, :product]]).
37
+ find_or_initialize_by(guest_token: cookies.signed[:guest_token])
36
38
  associate_user
37
39
  end
38
40
 
@@ -10,14 +10,17 @@ module Spree
10
10
 
11
11
  def index
12
12
  @searcher = build_searcher(params.merge(include_images: true))
13
- @products = @searcher.retrieve_products
13
+ @products = @searcher.retrieve_products.includes(:possible_promotions)
14
14
  @taxonomies = Spree::Taxonomy.includes(root: :children)
15
15
  end
16
16
 
17
17
  def show
18
- @variants = @product.variants_including_master.active(current_currency).includes([:option_values, :images])
18
+ @variants = @product.variants_including_master.
19
+ spree_base_scopes.
20
+ active(current_currency).
21
+ includes([:option_values, :images])
19
22
  @product_properties = @product.product_properties.includes(:property)
20
- @taxon = Spree::Taxon.find(params[:taxon_id]) if params[:taxon_id]
23
+ @taxon = params[:taxon_id].present? ? Spree::Taxon.find(params[:taxon_id]) : @product.taxons.first
21
24
  redirect_if_legacy_path
22
25
  end
23
26
 
@@ -37,7 +40,7 @@ module Spree
37
40
  else
38
41
  @products = Product.active(current_currency)
39
42
  end
40
- @product = @products.friendly.find(params[:id])
43
+ @product = @products.includes(:variants_including_master).friendly.find(params[:id])
41
44
  end
42
45
 
43
46
  def load_taxon
@@ -4,6 +4,10 @@ module Spree
4
4
 
5
5
  skip_before_action :set_current_order, only: :cart_link
6
6
 
7
+ def forbidden
8
+ render 'spree/shared/forbidden', layout: Spree::Config[:layout], status: 403
9
+ end
10
+
7
11
  def unauthorized
8
12
  render 'spree/shared/unauthorized', layout: Spree::Config[:layout], status: 401
9
13
  end
@@ -14,26 +18,27 @@ module Spree
14
18
  end
15
19
 
16
20
  protected
17
- # This method is placed here so that the CheckoutController
18
- # and OrdersController can both reference it (or any other controller
19
- # which needs it)
20
- def apply_coupon_code
21
- if params[:order] && params[:order][:coupon_code]
22
- @order.coupon_code = params[:order][:coupon_code]
23
-
24
- handler = PromotionHandler::Coupon.new(@order).apply
25
-
26
- if handler.error.present?
27
- flash.now[:error] = handler.error
28
- respond_with(@order) { |format| format.html { render :edit } } and return
29
- elsif handler.success
30
- flash[:success] = handler.success
31
- end
21
+
22
+ # This method is placed here so that the CheckoutController
23
+ # and OrdersController can both reference it (or any other controller
24
+ # which needs it)
25
+ def apply_coupon_code
26
+ if params[:order] && params[:order][:coupon_code]
27
+ @order.coupon_code = params[:order][:coupon_code]
28
+
29
+ handler = PromotionHandler::Coupon.new(@order).apply
30
+
31
+ if handler.error.present?
32
+ flash.now[:error] = handler.error
33
+ respond_with(@order) { |format| format.html { render :edit } } and return
34
+ elsif handler.success
35
+ flash[:success] = handler.success
32
36
  end
33
37
  end
38
+ end
34
39
 
35
- def config_locale
36
- Spree::Frontend::Config[:locale]
37
- end
40
+ def config_locale
41
+ Spree::Frontend::Config[:locale]
42
+ end
38
43
  end
39
44
  end
@@ -17,12 +17,7 @@ module Spree
17
17
  private
18
18
 
19
19
  def accurate_title
20
- if @taxon
21
- @taxon.seo_title
22
- else
23
- super
24
- end
20
+ @taxon.try(:seo_title) || super
25
21
  end
26
-
27
22
  end
28
23
  end
@@ -20,10 +20,11 @@ module Spree
20
20
  content_tag(:nav, crumb_list, id: 'breadcrumbs', class: 'col-md-12')
21
21
  end
22
22
 
23
- def checkout_progress
23
+ def checkout_progress(numbers: false)
24
24
  states = @order.checkout_steps
25
- items = states.map do |state|
25
+ items = states.each_with_index.map do |state, i|
26
26
  text = Spree.t("order_state.#{state}").titleize
27
+ text.prepend("#{i.succ}. ") if numbers
27
28
 
28
29
  css_classes = []
29
30
  current_index = states.index(@order.state)
@@ -4,12 +4,13 @@ module Spree
4
4
  # that we can use configurations as well as make it easier for end users to override this determination. One idea is
5
5
  # to show the most popular products for a particular taxon (that is an exercise left to the developer.)
6
6
  def taxon_preview(taxon, max=4)
7
- products = taxon.active_products.select("DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position").limit(max)
7
+ products = taxon.active_products.select("spree_products.*, spree_products_taxons.position").limit(max)
8
8
  if (products.size < max)
9
9
  products_arel = Spree::Product.arel_table
10
10
  taxon.descendants.each do |taxon|
11
11
  to_get = max - products.length
12
- products += taxon.active_products.select("DISTINCT (spree_products.id), spree_products.*, spree_products_taxons.position").where(products_arel[:id].not_in(products.map(&:id))).limit(to_get)
12
+ products += taxon.active_products.select("spree_products.*, spree_products_taxons.position").
13
+ where(products_arel[:id].not_in(products.map(&:id))).limit(to_get)
13
14
  break if products.size >= max
14
15
  end
15
16
  end
@@ -2,33 +2,43 @@
2
2
 
3
3
  <div class="inner" data-hook=<%="#{address_type}_inner" %>>
4
4
  <p class="form-group" id=<%="#{address_id}firstname" %>>
5
- <%= form.label :firstname, Spree.t(:first_name) %><span class="required">*</span><br />
5
+ <%= form.label :firstname do %>
6
+ <%= Spree.t(:first_name) %><abbr class="required" title="required">*</abbr>
7
+ <% end %>
6
8
  <%= form.text_field :firstname, :class => 'form-control required' %>
7
9
  </p>
8
10
  <p class="form-group" id=<%="#{address_id}lastname" %>>
9
- <%= form.label :lastname, Spree.t(:last_name) %><span class="required">*</span><br />
11
+ <%= form.label :lastname do %>
12
+ <%= Spree.t(:last_name) %><abbr class="required" title="required">*</abbr>
13
+ <% end %>
10
14
  <%= form.text_field :lastname, :class => 'form-control required' %>
11
15
  </p>
12
16
  <% if Spree::Config[:company] %>
13
17
  <p class="form-group" id=<%="#{address_id}company" %>>
14
- <%= form.label :company, Spree.t(:company) %><br />
18
+ <%= form.label :company, Spree.t(:company) %>
15
19
  <%= form.text_field :company, :class => 'form-control' %>
16
20
  </p>
17
21
  <% end %>
18
22
  <p class="form-group" id=<%="#{address_id}address1" %>>
19
- <%= form.label :address1, Spree.t(:street_address) %><span class="required">*</span><br />
23
+ <%= form.label :address1 do %>
24
+ <%= Spree.t(:street_address) %><abbr class="required" title="required">*</abbr>
25
+ <% end %>
20
26
  <%= form.text_field :address1, :class => 'form-control required' %>
21
27
  </p>
22
28
  <p class="form-group" id=<%="#{address_id}address2" %>>
23
- <%= form.label :address2, Spree.t(:street_address_2) %><br />
29
+ <%= form.label :address2, Spree.t(:street_address_2) %>
24
30
  <%= form.text_field :address2, :class => 'form-control' %>
25
31
  </p>
26
32
  <p class="form-group" id=<%="#{address_id}city" %>>
27
- <%= form.label :city, Spree.t(:city) %><span class="required">*</span><br />
33
+ <%= form.label :city do %>
34
+ <%= Spree.t(:city) %><abbr class="required" title="required">*</abbr>
35
+ <% end %>
28
36
  <%= form.text_field :city, :class => 'form-control required' %>
29
37
  </p>
30
38
  <p class="form-group" id=<%="#{address_id}country" %>>
31
- <%= form.label :country_id, Spree.t(:country) %><span class="required">*</span><br />
39
+ <%= form.label :country_id do %>
40
+ <%= Spree.t(:country) %><abbr class="required" title="required">*</abbr>
41
+ <% end %>
32
42
  <span id=<%="#{address_id}country-selection" %>>
33
43
  <%= form.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'form-control required'} %>
34
44
  </span>
@@ -37,9 +47,11 @@
37
47
  <% if Spree::Config[:address_requires_state] %>
38
48
  <p class="form-group" id=<%="#{address_id}state" %>>
39
49
  <% have_states = !address.country.states.empty? %>
40
- <%= form.label :state, Spree.t(:state) %><span class='required' id=<%="#{address_id}state-required"%>>*</span><br/>
50
+ <%= form.label :state do %>
51
+ <%= Spree.t(:state) %><abbr class='required' title="required" id=<%="#{address_id}state-required"%>>*</abbr>
52
+ <% end %>
41
53
 
42
- <% state_elements = [
54
+ <%== state_elements = [
43
55
  form.collection_select(:state_id, address.country.states,
44
56
  :id, :name,
45
57
  {:include_blank => true},
@@ -50,9 +62,6 @@
50
62
  :disabled => have_states)
51
63
  ].join.gsub('"', "'").gsub("\n", "")
52
64
  %>
53
- <%= javascript_tag do %>
54
- $('#<%="#{address_id}state" %>').append("<%== state_elements %>");
55
- <% end %>
56
65
  </p>
57
66
  <noscript>
58
67
  <%= form.text_field :state_name, :class => 'form-control required' %>
@@ -60,16 +69,20 @@
60
69
  <% end %>
61
70
 
62
71
  <p class="form-group" id=<%="#{address_id}zipcode" %>>
63
- <%= form.label :zipcode, Spree.t(:zip) %><% if address.require_zipcode? %><span class="required">*</span><br /><% end %>
72
+ <%= form.label :zipcode do %>
73
+ <%= Spree.t(:zip) %><% if address.require_zipcode? %><abbr class="required" title="required">*</abbr><% end %>
74
+ <% end %>
64
75
  <%= form.text_field :zipcode, :class => "form-control #{'required' if address.require_zipcode?}" %>
65
76
  </p>
66
77
  <p class="form-group" id=<%="#{address_id}phone" %>>
67
- <%= form.label :phone, Spree.t(:phone) %><% if address.require_phone? %><span class="required">*</span><br /><% end %>
78
+ <%= form.label :phone do %>
79
+ <%= Spree.t(:phone) %><% if address.require_phone? %><abbr class="required" title="required">*</abbr><% end %>
80
+ <% end %>
68
81
  <%= form.phone_field :phone, :class => "form-control #{'required' if address.require_phone?}" %>
69
82
  </p>
70
83
  <% if Spree::Config[:alternative_shipping_phone] %>
71
84
  <p class="form-group" id=<%="#{address_id}altphone" %>>
72
- <%= form.label :alternative_phone, Spree.t(:alternative_phone) %><br />
85
+ <%= form.label :alternative_phone, Spree.t(:alternative_phone) %>
73
86
  <%= form.phone_field :alternative_phone, :class => 'form-control' %>
74
87
  </p>
75
88
  <% end %>
@@ -9,7 +9,6 @@
9
9
  <label for="use_existing_card_yes">
10
10
  <%= Spree.t(:use_existing_cc) %>
11
11
  </label>
12
- <br/>
13
12
  <%= radio_button_tag 'use_existing_card', 'no' %>
14
13
  <label for="use_existing_card_no">
15
14
  <%= Spree.t(:use_new_cc_or_payment_method) %>
@@ -36,6 +35,8 @@
36
35
  </div>
37
36
  <% end %>
38
37
 
38
+ <%= render partial: 'spree/checkout/payment/storecredit' %>
39
+
39
40
  <ul class="list-group" id="payment-method-fields" data-hook>
40
41
  <% @order.available_payment_methods.each do |method| %>
41
42
  <li class="list-group-item">
@@ -58,7 +59,7 @@
58
59
  </ul>
59
60
 
60
61
  <p class='field' data-hook='coupon_code'>
61
- <%= form.label :coupon_code %><br />
62
+ <%= form.label :coupon_code %>
62
63
  <%= form.text_field :coupon_code, :class => 'form-control' %>
63
64
  </p>
64
65
  </div>