From dcacc854ebf9e397956ccd46c803fd9a560be222 Mon Sep 17 00:00:00 2001 From: Rainer Dema Date: Tue, 14 Nov 2023 15:09:10 +0100 Subject: [PATCH] Integrate turbo frame for address form --- .../solidus_admin/orders/show/address/component.html.erb | 5 ++++- .../solidus_admin/orders/show/address/component.rb | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/admin/app/components/solidus_admin/orders/show/address/component.html.erb b/admin/app/components/solidus_admin/orders/show/address/component.html.erb index c6a1811fbea..f3e1600f2ab 100644 --- a/admin/app/components/solidus_admin/orders/show/address/component.html.erb +++ b/admin/app/components/solidus_admin/orders/show/address/component.html.erb @@ -25,6 +25,7 @@ href: solidus_admin.send("order_#{@type}_address_path", @order, address_id: address.id), class: 'block text-black text-sm hover:bg-gray-50 p-2 mx-2 w-auto rounded-lg', 'data-action': "#{stimulus_id}#close", + 'data-turbo-frame': address_frame_id ) do %> <%= format_address(address) %> <% end %> @@ -35,7 +36,9 @@
- <%= render component('ui/forms/address').new(address: @address, name: "order[#{@type}_address_attributes]") %> + <%= turbo_frame_tag address_frame_id do %> + <%= render component('ui/forms/address').new(address: @address, name: "order[#{@type}_address_attributes]") %> + <% end %>