From 93a661ac08dd7ebbe56706f303e1e454f44d82df Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 7 Mar 2014 13:34:57 +1100 Subject: [PATCH] Do not show product unit fields when creating a new product - make this interface less confusing --- .../products/new/add_unit_form.html.haml.deface | 17 ----------------- spec/features/admin/products_spec.rb | 8 -------- 2 files changed, 25 deletions(-) delete mode 100644 app/overrides/spree/admin/products/new/add_unit_form.html.haml.deface diff --git a/app/overrides/spree/admin/products/new/add_unit_form.html.haml.deface b/app/overrides/spree/admin/products/new/add_unit_form.html.haml.deface deleted file mode 100644 index 03021b41d9..0000000000 --- a/app/overrides/spree/admin/products/new/add_unit_form.html.haml.deface +++ /dev/null @@ -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 diff --git a/spec/features/admin/products_spec.rb b/spec/features/admin/products_spec.rb index ebdb95aa9e..20d599404b 100644 --- a/spec/features/admin/products_spec.rb +++ b/spec/features/admin/products_spec.rb @@ -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' }