From 1df8d428114160a1900204579104c295d32ab990 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Sun, 2 Nov 2025 11:29:35 +0100 Subject: [PATCH] Create cards with CTRL/CMD enter --- app/views/cards/container/footer/_draft.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/cards/container/footer/_draft.html.erb b/app/views/cards/container/footer/_draft.html.erb index 1c39e6ad0..a2317ce08 100644 --- a/app/views/cards/container/footer/_draft.html.erb +++ b/app/views/cards/container/footer/_draft.html.erb @@ -1,5 +1,6 @@
- <%= button_to "Create card", card_publish_path(card), name: "creation_type", value: "add", class: "btn" %> + <%= 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 "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" } %>