Files
fizzy/app/views/cards/container/_save_button.html.erb
T
Mike Dalessio b05ecb7809 Update card buttons dynamically
User flows when editing a card look like:
- Click "Edit" → the closure buttons are replaced by "Save changes"
- Submit card form → Saves and restores closure buttons
- Press ESC while editing → Cancels and restores closure buttons

Also, renamed for clarity:
- _title.html.erb → _content.html.erb

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 12:14:39 -05:00

9 lines
469 B
Plaintext

<div class="flex gap-half">
<%= button_tag type: :submit, form: dom_id(card, :edit_form), class: "btn btn--circle-mobile borderless",
data: { controller: "hotkey", action: "keydown.ctrl+enter@document->hotkey#click keydown.meta+enter@document->hotkey#click" } do %>
<%= icon_tag "check", class: "icon--mobile-only" %>
<span>Save changes</span>
<kbd class="txt-x-small hide-on-touch"><%= hotkey_label(["ctrl", "enter"]) %></kbd>
<% end %>
</div>