From 6ba767791cc1732656cfe39824d49b3e3f6b0712 Mon Sep 17 00:00:00 2001 From: Kevin Attfield Date: Tue, 20 Feb 2018 14:43:36 -0800 Subject: [PATCH] Properly limit per-quantity calculator options item-adjustments and quantity-adjustments have their own config for allowed calculators. When presenting a list of calculators for admins editing promos we need to respect that config. --- .../actions/_create_quantity_adjustments.html.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb b/backend/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb index df34f6a4b20..e2e962b3ff0 100644 --- a/backend/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +++ b/backend/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb @@ -4,5 +4,8 @@ <%= number_field_tag field_name, promotion_action.preferred_group_size, class: "fullwidth", min: 1 %> -<%= render "spree/admin/promotions/actions/create_item_adjustments", - promotion_action: promotion_action, param_prefix: param_prefix %> +<%= render "spree/admin/promotions/actions/promotion_calculators_with_custom_fields", + calculators: Rails.application.config.spree.calculators.promotion_actions_create_quantity_adjustments, + promotion_action: promotion_action, + param_prefix: param_prefix +%>