mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Do not show product unit fields when creating a new product - make this interface less confusing
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
/ insert_before "[data-hook='new_product_attrs']"
|
||||
|
||||
.row
|
||||
.alpha.six.columns
|
||||
= f.label :variant_unit, 'Variant unit'
|
||||
= f.select :variant_unit, product_variant_unit_options, {:include_blank => true}, {:class => "select2 fullwidth"}
|
||||
= f.error_message_on :variant_unit
|
||||
|
||||
.four.columns
|
||||
= f.label :variant_unit_scale, 'Variant unit scale'
|
||||
= f.text_field :variant_unit_scale, {class: "fullwidth"}
|
||||
= f.error_message_on :variant_unit_scale
|
||||
|
||||
.omega.six.columns
|
||||
= f.label :variant_unit_name, 'Variant unit name'
|
||||
= f.text_field :variant_unit_name, {class: "fullwidth"}
|
||||
= f.error_message_on :variant_unit_name
|
||||
@@ -23,9 +23,6 @@ feature %q{
|
||||
fill_in 'product_name', with: 'A new product !!!'
|
||||
fill_in 'product_price', with: '19.99'
|
||||
select 'New supplier', from: 'product_supplier_id'
|
||||
select 'Weight', from: 'product_variant_unit'
|
||||
fill_in 'product_variant_unit_scale', with: 1000
|
||||
fill_in 'product_variant_unit_name', with: ''
|
||||
|
||||
click_button 'Create'
|
||||
|
||||
@@ -34,11 +31,6 @@ feature %q{
|
||||
product.supplier.should == @supplier
|
||||
product.group_buy.should be_false
|
||||
|
||||
product.variant_unit.should == 'weight'
|
||||
product.variant_unit_scale.should == 1000
|
||||
product.variant_unit_name.should == ''
|
||||
product.option_types.first.name.should == 'unit_weight'
|
||||
|
||||
# Distributors
|
||||
within('#sidebar') { click_link 'Product Distributions' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user