From f7561b428e5283fda32934534ec5ffa573293008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Gon=C3=A7alves?= Date: Fri, 10 May 2024 15:49:33 +0100 Subject: [PATCH 1/4] Intorduced the simple_format method to the shipping method description --- app/views/checkout/_details.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/checkout/_details.html.haml b/app/views/checkout/_details.html.haml index b837e52812..3a2cb5d90f 100644 --- a/app/views/checkout/_details.html.haml +++ b/app/views/checkout/_details.html.haml @@ -95,7 +95,7 @@ %div.checkout-input{"data-shippingmethod-target": "shippingMethodDescription", "data-shippingmethodid": shipping_method.id , style: "display: #{ship_method_is_selected ? 'block' : 'none'}" } #distributor_address.panel - if shipping_method.description.present? - %span #{shipping_method.description} + %span #{simple_format(shipping_method.description)} %br/ %br/ - if @order.order_cycle.pickup_time_for(@order.distributor) From 89f7c4e3518f1934ec2fe03e75583a80933e4613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Gon=C3=A7alves?= Date: Mon, 13 May 2024 10:34:24 +0100 Subject: [PATCH 2/4] Intorduced the simple_format method to the payment method description --- app/views/checkout/_payment.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/checkout/_payment.html.haml b/app/views/checkout/_payment.html.haml index 656a246efe..19c066f498 100644 --- a/app/views/checkout/_payment.html.haml +++ b/app/views/checkout/_payment.html.haml @@ -29,7 +29,7 @@ .paymentmethod-container{"data-paymentmethod-id": "#{payment_method.id}", style: "display: #{payment_method.id == selected_payment_method ? "block" : "none"}"} - if payment_method.description && !payment_method.description.empty? .paymentmethod-description.panel - #{payment_method.description} + #{simple_format(payment_method.description)} .paymentmethod-form = render partial: "checkout/payment/#{payment_method.method_type}", locals: { payment_method: payment_method, f: f } From 50115bdef945b818946016c9dc0784b7d4375f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Gon=C3=A7alves?= Date: Tue, 14 May 2024 10:39:30 +0100 Subject: [PATCH 3/4] Changes to views/checkout/details.html.haml:line 98 and changes to view/checkout/payment.html.haml:line 32 --- app/views/checkout/_details.html.haml | 2 +- app/views/checkout/_payment.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/checkout/_details.html.haml b/app/views/checkout/_details.html.haml index 3a2cb5d90f..1918afc5cd 100644 --- a/app/views/checkout/_details.html.haml +++ b/app/views/checkout/_details.html.haml @@ -95,7 +95,7 @@ %div.checkout-input{"data-shippingmethod-target": "shippingMethodDescription", "data-shippingmethodid": shipping_method.id , style: "display: #{ship_method_is_selected ? 'block' : 'none'}" } #distributor_address.panel - if shipping_method.description.present? - %span #{simple_format(shipping_method.description)} + = simple_format(html_escape(shipping_method.description)) %br/ %br/ - if @order.order_cycle.pickup_time_for(@order.distributor) diff --git a/app/views/checkout/_payment.html.haml b/app/views/checkout/_payment.html.haml index 19c066f498..516d2025bb 100644 --- a/app/views/checkout/_payment.html.haml +++ b/app/views/checkout/_payment.html.haml @@ -29,7 +29,7 @@ .paymentmethod-container{"data-paymentmethod-id": "#{payment_method.id}", style: "display: #{payment_method.id == selected_payment_method ? "block" : "none"}"} - if payment_method.description && !payment_method.description.empty? .paymentmethod-description.panel - #{simple_format(payment_method.description)} + = simple_format(html_escape(payment_method.description)) .paymentmethod-form = render partial: "checkout/payment/#{payment_method.method_type}", locals: { payment_method: payment_method, f: f } From 1c0a6d12298ca26659b9a6ccc779bb38f96fa934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Gon=C3=A7alves?= Date: Mon, 20 May 2024 03:55:49 +0100 Subject: [PATCH 4/4] Reintroduced changes made in commit #12443 --- app/views/checkout/_details.html.haml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/views/checkout/_details.html.haml b/app/views/checkout/_details.html.haml index 1918afc5cd..56146d19c0 100644 --- a/app/views/checkout/_details.html.haml +++ b/app/views/checkout/_details.html.haml @@ -96,11 +96,6 @@ #distributor_address.panel - if shipping_method.description.present? = simple_format(html_escape(shipping_method.description)) - %br/ - %br/ - - if @order.order_cycle.pickup_time_for(@order.distributor) - = t :checkout_ready_for - = @order.order_cycle.pickup_time_for(@order.distributor) = f.error_message_on :shipping_method, standalone: true