Skip to content

Commit

Permalink
Merge pull request #2262 from gregdaynes/require-master-variant-price
Browse files Browse the repository at this point in the history
Add required to product master price field
  • Loading branch information
jhawthorn authored Oct 16, 2017
2 parents 96d6ee5 + 0ecd93e commit 9e0ef8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/app/views/spree/admin/products/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
<div class="right col-3" data-hook="admin_product_form_right">
<div data-hook="admin_product_form_price">
<%= f.field_container :price do %>
<%= f.label :price, class: 'required' %>
<%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :price,
<%= f.label :price, class: Spree::Config.require_master_price ? 'required' : '' %>
<%= render "spree/admin/shared/number_with_currency", f: f,
amount_attr: :price,
required: Spree::Config.require_master_price,
currency: Spree::Config.default_pricing_options.currency %>
<%= f.error_message_on :price %>
<% end %>
Expand Down

0 comments on commit 9e0ef8f

Please sign in to comment.