Merge pull request #1204 from basecamp/column-bugs

Fix some column bugs
This commit is contained in:
Jorge Manrubia
2025-10-01 16:24:28 +02:00
committed by GitHub
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
class Column < ApplicationRecord
belongs_to :collection
belongs_to :collection, touch: true
has_many :cards, dependent: :nullify
validates :name, presence: true
@@ -21,7 +21,7 @@
<div data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
<button id="<%= dom_id(column, :manage_menu) %>" class="popup__btn btn" data-action="click->dialog#open:stop" data-clicker-target="clickable" hidden aria-hidden>Rename column</button>
<dialog class="popup panel flex-column gap-half fill-white shadow txt-small margin-block-double" data-dialog-target="dialog">
<%= 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" %>
</dialog>
</div>
</div>
@@ -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 %>
@@ -3,6 +3,6 @@
<%= icon_tag "add", class: "translucent", "aria-hidden": true %>
</button>
<dialog class="popup panel flex-column gap-half fill-white shadow txt-small margin-block-double" data-dialog-target="dialog">
<%= 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" %>
</dialog>
</div>