From 6a119dbe7a1c1abf52e033a75de96afe95b981f3 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Mon, 10 Nov 2025 17:13:45 -0600 Subject: [PATCH] Adjust these so we get proper spinner styles when submitting --- app/views/cards/container/footer/_draft.html.erb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/views/cards/container/footer/_draft.html.erb b/app/views/cards/container/footer/_draft.html.erb index a2317ce08..bacf320c6 100644 --- a/app/views/cards/container/footer/_draft.html.erb +++ b/app/views/cards/container/footer/_draft.html.erb @@ -1,7 +1,12 @@
- <%= button_to "Create card", card_publish_path(card), name: "creation_type", value: "add", class: "btn", - form: { data: { controller: "form", action: "keydown.ctrl+enter@document->form#submit:prevent keydown.meta+enter@document->form#submit:prevent" } } %> + <%= button_to card_publish_path(card), name: "creation_type", value: "add", class: "btn", + form: { data: { controller: "form" } }, + data: { form_target: "submit" } do %> + Create card + <% end %> - <%= button_to "Create and add another", card_publish_path(card), method: :post, class: "btn btn--reversed", name: "creation_type", value: "add_another", - title: "Create and add another (ctrl+shift+enter)", form: { data: { turbo: false } }, data: { controller: "hotkey", action: "keydown.ctrl+shift+enter@document->hotkey#click" } %> + <%= button_to card_publish_path(card), method: :post, class: "btn btn--reversed", name: "creation_type", value: "add_another", + title: "Create and add another (ctrl+shift+enter)", form: { data: { controller: "form" } }, data: { form_target: "submit" } do %> + Create and add another + <% end %>