From 1a39a55009e761c5b94587b1ef94eda7428588c8 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Tue, 1 Sep 2020 14:06:15 +0100 Subject: [PATCH] Fix problem of converting from erb to haml --- .../admin/orders/customer_details/_address_form.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/spree/admin/orders/customer_details/_address_form.html.haml b/app/views/spree/admin/orders/customer_details/_address_form.html.haml index 96636ff20f..e5d0d443f1 100644 --- a/app/views/spree/admin/orders/customer_details/_address_form.html.haml +++ b/app/views/spree/admin/orders/customer_details/_address_form.html.haml @@ -7,7 +7,9 @@ - is_shipping_address = name == Spree.t(:shipping_address) - s_or_b = is_shipping_address ? 's' : 'b' -%div{id: "#{is_shipping_address ? 'shipping' : 'billing'}", style: "display: #{(use_billing (!(@order.bill_address.empty? @order.ship_address.empty?) @order.bill_address.eql?(@order.ship_address))) ? 'none' : 'block'}"} +- display_style = (use_billing && (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address))) ? 'none' : 'block' + +%div{id: "#{is_shipping_address ? 'shipping' : 'billing'}", style: "display: #{display_style}"} %div{class: "field"} = f.label :firstname, Spree.t(:first_name) + ':' = f.text_field :firstname, class: 'fullwidth'