app/components/solidus_admin/orders/show/email/component.html.erb in solidus_admin-0.2.0 vs app/components/solidus_admin/orders/show/email/component.html.erb in solidus_admin-0.3.0
- old
+ new
@@ -1,18 +1,23 @@
<div class="<%= stimulus_id %>">
- <%= render component("orders/show").new(order: @order) %>
- <%= render component("ui/modal").new(title: t(".title"), close_path: close_path) do |modal| %>
- <%= form_for @order, url: close_path, html: { id: form_id} do |f| %>
- <%= render component("ui/forms/field").text_field(f, :email) %>
- <label class="font-normal text-sm mt-4 block">
- <%= t('.guest_checkout') %>:
- <output class="font-semibold text-sm"><%= @order.user ? t('.no') : t('.yes') %></output>
- <%= render component('ui/toggletip').new(text: t('.guest_checkout_tip'), class: "align-middle") %>
- </label>
- <% end %>
+ <%= turbo_frame_tag "edit_order_email_modal" do %>
+ <%= render component("ui/modal").new(title: t(".title")) do |modal| %>
+ <%= form_for @order, url: solidus_admin.order_path(@order), html: { id: form_id } do |f| %>
+ <%= render component("ui/forms/field").text_field(f, :email) %>
+ <label class="font-normal text-sm mt-4 block">
+ <%= t('.guest_checkout') %>:
+ <output class="font-semibold text-sm"><%= @order.user ? t('.no') : t('.yes') %></output>
+ <%= render component('ui/toggletip').new(text: t('.guest_checkout_tip'), class: "align-middle") %>
+ </label>
+ <% end %>
- <% modal.with_actions do %>
- <%= render component("ui/button").new(tag: :a, scheme: :secondary, href: close_path, type: :submit, text: t('.cancel')) %>
- <%= render component("ui/button").new(form: form_id, type: :submit, text: t('.submit')) %>
+ <% modal.with_actions do %>
+ <form method="dialog">
+ <%= render component("ui/button").new(scheme: :secondary, text: t('.cancel')) %>
+ </form>
+ <%= render component("ui/button").new(form: form_id, type: :submit, text: t('.submit')) %>
+ <% end %>
<% end %>
<% end %>
+
+ <%= render component("orders/show").new(order: @order) %>
</div>