From cc3e147e85c18d38cc3c10cd79d7b7305c4a6c5c Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Fri, 7 Feb 2025 17:58:31 +0000 Subject: [PATCH] When creating, put a form in the bubble title area --- app/views/bubbles/_bubble.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/bubbles/_bubble.html.erb b/app/views/bubbles/_bubble.html.erb index 521197134..1a126fa97 100644 --- a/app/views/bubbles/_bubble.html.erb +++ b/app/views/bubbles/_bubble.html.erb @@ -9,10 +9,12 @@

<% if bubble.creating? %> - <%= turbo_frame_tag bubble, :edit, src: edit_bucket_bubble_path(bubble.bucket, bubble) %> + <%= form_with model: bubble, url: bucket_bubble_path(bubble.bucket, bubble) do |form| %> + <%= form.text_field :title, placeholder: "Name it…", class: "input txt-align-center full-width borderless", autofocus: bubble.title.blank? %> + <% end %> <% else %> <%= turbo_frame_tag bubble, :edit do %> - <%= link_to bubble.title, edit_bucket_bubble_path(bubble.bucket, bubble), class: "txt-undecorated" %> + <%= link_to bubble_title(bubble), edit_bucket_bubble_path(bubble.bucket, bubble), class: "txt-undecorated" %>
<%= render "bubbles/tags", bubble: bubble %>