diff --git a/app/views/cards/container/_content.html.erb b/app/views/cards/container/_content.html.erb index ff0a6579f..ba94041c1 100644 --- a/app/views/cards/container/_content.html.erb +++ b/app/views/cards/container/_content.html.erb @@ -2,8 +2,8 @@
<%= turbo_frame_tag card, :edit do %> <%# When canceling an edit (with the ESC key), restore the button area to show "Edit" instead of "Save changes". %> - <%= turbo_stream.update dom_id(card, :card_closure_toggle) do %> - <%= render "cards/container/closure_buttons", card: card %> + <%= turbo_stream.replace dom_id(card, :card_closure_toggle) do %> + <%= render "cards/container/closure", card: card %> <% end %> <%= render "cards/container/content_display", card: card %> diff --git a/app/views/cards/edit.html.erb b/app/views/cards/edit.html.erb index 66f5c4cf2..21a35d09f 100644 --- a/app/views/cards/edit.html.erb +++ b/app/views/cards/edit.html.erb @@ -1,5 +1,5 @@ <%= turbo_frame_tag @card, :edit do %> - <%# When entering edit mode, this turbo-stream replaces the button area to show + <%# When entering edit mode, this turbo-stream updates the button area to show "Save changes" instead of "Edit". Turbo processes this stream as part of the frame response. %> <%= turbo_stream.update dom_id(@card, :card_closure_toggle) do %> diff --git a/app/views/cards/update.turbo_stream.erb b/app/views/cards/update.turbo_stream.erb index fea57d238..76663e2f0 100644 --- a/app/views/cards/update.turbo_stream.erb +++ b/app/views/cards/update.turbo_stream.erb @@ -4,6 +4,6 @@ <%= render "cards/container/content_display", card: @card %> <% end %> -<%= turbo_stream.update dom_id(@card, :card_closure_toggle) do %> - <%= render "cards/container/closure_buttons", card: @card %> +<%= turbo_stream.replace dom_id(@card, :card_closure_toggle) do %> + <%= render "cards/container/closure", card: @card %> <% end %>