diff --git a/app/views/collections/show/menu/_column.html.erb b/app/views/collections/show/menu/_column.html.erb index 2b5f0b4db..22d249126 100644 --- a/app/views/collections/show/menu/_column.html.erb +++ b/app/views/collections/show/menu/_column.html.erb @@ -21,7 +21,7 @@
- <%= render "collections/show/menu/column_form", collection: column.collection, column: column %> + <%= render "collections/show/menu/column_form", collection: column.collection, column: column, label: "Rename column" %>
diff --git a/app/views/collections/show/menu/_column_form.html.erb b/app/views/collections/show/menu/_column_form.html.erb index 84a3bc731..c98091d0b 100644 --- a/app/views/collections/show/menu/_column_form.html.erb +++ b/app/views/collections/show/menu/_column_form.html.erb @@ -1,5 +1,5 @@ -<%= form_with model: [collection, column], data: { action: "turbo:submit-end->dialog#close" } do |form| %> +<%= form_with model: [collection, column], data: { controller: "form", action: "turbo:submit-end->dialog#close turbo:submit-end->form#reset" } do |form| %> <%= form.text_field :name, class: "input", placeholder: "Column name", value: column.name, required: true, autocomplete: "off", pattern: ".*\\S.*", title: "Column name cannot be blank" %> - <%= form.submit "Rename column", class: "btn btn--link" %> + <%= form.submit label, class: "btn btn--link" %> <% end %> diff --git a/app/views/collections/show/menu/_columns.html.erb b/app/views/collections/show/menu/_columns.html.erb index 881c8448b..0d453267a 100644 --- a/app/views/collections/show/menu/_columns.html.erb +++ b/app/views/collections/show/menu/_columns.html.erb @@ -3,6 +3,6 @@ <%= icon_tag "add", class: "translucent", "aria-hidden": true %> - <%= render "collections/show/menu/column_form", collection: collection, column: Column.new %> + <%= render "collections/show/menu/column_form", collection: collection, column: Column.new, label: "Add column" %>