From 335c2475ab59462b5f59ca8f5007c500626f76b4 Mon Sep 17 00:00:00 2001 From: Mohamed ABDELLANI Date: Thu, 22 Feb 2024 20:09:43 +0100 Subject: [PATCH] hide alternative invoice checkbox if invoices feature is enabled --- app/views/admin/invoice_settings/edit.html.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/admin/invoice_settings/edit.html.haml b/app/views/admin/invoice_settings/edit.html.haml index 0647c389201..ec5e7e6e65d 100644 --- a/app/views/admin/invoice_settings/edit.html.haml +++ b/app/views/admin/invoice_settings/edit.html.haml @@ -10,10 +10,11 @@ = check_box_tag 'preferences[enable_invoices?]', '1', Spree::Config[:enable_invoices?] = label_tag nil, t('.enable_invoices?') - .field.align-center - = hidden_field_tag 'preferences[invoice_style2?]', '0' - = check_box_tag 'preferences[invoice_style2?]', '1', Spree::Config[:invoice_style2?] - = label_tag nil, t('.invoice_style2?') + - if ! OpenFoodNetwork::FeatureToggle.enabled?(:invoices, spree_current_user) + .field.align-center + = hidden_field_tag 'preferences[invoice_style2?]', '0' + = check_box_tag 'preferences[invoice_style2?]', '1', Spree::Config[:invoice_style2?] + = label_tag nil, t('.invoice_style2?') .field.align-center = hidden_field_tag 'preferences[enterprise_number_required_on_invoices?]', '0'