From fb2575aaebc01f96982b82b7945d9441c7985ed8 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Tue, 2 Jul 2024 09:47:48 +1000 Subject: [PATCH] Fix more rebase issue --- app/views/admin/products_v3/_table.html.haml | 25 +------------------- config/locales/en.yml | 1 - 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/app/views/admin/products_v3/_table.html.haml b/app/views/admin/products_v3/_table.html.haml index 524b3d6d4a..e04f33b00a 100644 --- a/app/views/admin/products_v3/_table.html.haml +++ b/app/views/admin/products_v3/_table.html.haml @@ -63,27 +63,4 @@ %th.align-left.col-inherits_properties= t('admin.products_page.columns.inherits_properties') %th.align-right= t('admin.products_page.columns.actions') - products.each_with_index do |product, product_index| - = form.fields_for("products", product, index: product_index) do |product_form| - %tbody.relaxed{ id: dom_id(product), data: { 'record-id': product_form.object.id, - controller: "nested-form product", - action: 'rails-nested-form:add->bulk-form#registerElements rails-nested-form:remove->bulk-form#toggleFormChanged' } } - %tr - = render partial: 'product_row', locals: { f: product_form, product: } - - - product.variants.each_with_index do |variant, variant_index| - = form.fields_for("products][#{product_index}][variants_attributes][", variant, index: variant_index) do |variant_form| - %tr.condensed{ id: dom_id(variant), 'data-controller': "variant", 'class': "nested-form-wrapper", 'data-new-record': variant.new_record? ? "true" : false } - = render partial: 'variant_row', locals: { variant:, f: variant_form, category_options:, tax_category_options:, producer_options: } - - = form.fields_for("products][#{product_index}][variants_attributes][NEW_RECORD", product.variants.build) do |new_variant_form| - %template{ 'data-nested-form-target': "template" } - %tr.condensed{ 'data-controller': "variant", 'class': "nested-form-wrapper", 'data-new-record': "true" } - = render partial: 'variant_row', locals: { variant: new_variant_form.object, f: new_variant_form, category_options:, tax_category_options:, producer_options: } - - %tr{ 'data-nested-form-target': "target" } - %tr.condensed - %td - %td{ colspan: 11 } - %button.secondary.condensed.naked.icon-plus{ 'data-action': "nested-form#add", - 'aria-label': t('.new_variant') } - =t('.new_variant') + = render partial: 'product_variant_row', locals: { form:, product:, product_index:, producer_options:, category_options:, tax_category_options: } diff --git a/config/locales/en.yml b/config/locales/en.yml index 2e93115d54..d0764b7a91 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -902,7 +902,6 @@ en: other: "%{count} products could not be saved. Please review the errors and try again." reset: Discard changes save: Save changes - new_variant: New variant product_variant_row: new_variant: New variant bulk_update: