Bring back a dedicated button for adding tags
Fixes and issue in which you couldn't add a new tag if there were any matches so you couldn't created a tag named "blue" if there was already one named "blueberry" `
This commit is contained in:
@@ -7,12 +7,19 @@
|
||||
>
|
||||
<strong class="popup__title">Tag this…</strong>
|
||||
|
||||
<%= form_with url: card_taggings_path(@card), class: "flex flex-column gap-half full-width margin-block-half" do |form| %>
|
||||
<%= form_with url: card_taggings_path(@card), id: dom_id(@card, :tags_form), class: "flex flex-column gap-half full-width margin-block-half" do |form| %>
|
||||
<%= form.text_field :tag_title, placeholder: @tags.any? ? "Add a new tag or filter…" : "Name this tag…", class: "input txt-small full-width",
|
||||
autocomplete: "off", data: { filter_target: "input", action: "input->filter#filter" } %>
|
||||
<% end %>
|
||||
|
||||
<ul class="popup__list" data-filter-target="list">
|
||||
<li class="popup__item" data-navigable-list-target="item">
|
||||
<%= button_tag "Create a new tag", type: "submit", form: dom_id(@card, :tags_form), class: "btn popup__btn" do %>
|
||||
<%= icon_tag "add" %>
|
||||
<span>Create tag</span>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<% @tags.each do |tag| %>
|
||||
<li class="popup__item" data-filter-target="item" data-navigable-list-target="item">
|
||||
<%= button_to card_taggings_path(@card, params: { tag_title: tag.title }), method: :post,
|
||||
|
||||
Reference in New Issue
Block a user