Rename to local-save-controller

This commit is contained in:
Kevin McConnell
2025-02-28 15:13:23 +00:00
parent 06dcb11e4b
commit 4d13db0f8b
2 changed files with 5 additions and 5 deletions
+5 -5
View File
@@ -1,12 +1,12 @@
<div class="comment comment--new border-radius flex align-start full-width margin-block-end-double">
<div class="flex flex-column full-width">
<div class="position-relative">
<%= form_with model: Comment.new, url: bucket_bubble_comments_path(bubble.bucket, bubble), class: "flex flex-column gap full-width",
data: { controller: "form paste autosave",
autosave_key_value: "comment-#{bubble.id}",
action: "turbo:submit-end->autosave#submit keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop paste->paste#pasteFiles" } do |form| %>
<%= form_with model: Comment.new, url: bucket_bubble_comments_path(bubble.bucket, bubble), class: "flex flex-column gap full-width",
data: { controller: "form paste local-save",
local_save_key_value: "comment-#{bubble.id}",
action: "turbo:submit-end->local-save#submit keydown.ctrl+enter->form#submit:prevent keydown.meta+enter->form#submit:prevent keydown.esc->form#cancel:stop paste->paste#pasteFiles" } do |form| %>
<%= form.markdown_area :body, class: "input comment__input", required: true, placeholder: new_comment_placeholder(bubble),
data: { autosave_target: "input", action: "house-md:change->autosave#save" } %>
data: { local_save_target: "input", action: "house-md:change->local-save#save" } %>
<%= form.button class: "comment__submit btn btn--reversed flex-item-justify-end txt-small" do %>
<%= image_tag "check.svg", aria: { hidden: "true" }, size: 24 %>
<span class="for-screen-reader">Save</span>