Skip to content

Commit

Permalink
Display merge button as disabled if only one thread is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
mirrec committed Oct 16, 2023
1 parent 6b6811d commit 63f58df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<p class="grow text-xl font-semibold text-left text-gray-900">Správy v schránke</p>
<% if @ids.present? %>
<%= submit_tag 'Spojiť vlákna', name: 'merge', data: { turbo_confirm: 'Naozaj chcete spojiť označené vlákna do jedného?' }, class: "flex justify-center items-center gap-2.5 px-3.5 py-2.5 rounded-md bg-blue-600 text-base font-medium text-left text-white hover:cursor-pointer" %>
<%= submit_tag 'Spojiť vlákna', name: 'merge', title: (@ids.length < 2 ? "Označte aspoň dve vlákna" : "Spojiť označené vlákna do jedného"), disabled: @ids.length < 2, data: { turbo_confirm: 'Naozaj chcete spojiť označené vlákna do jedného?' }, class: "flex justify-center items-center gap-2.5 px-3.5 py-2.5 rounded-md #{@ids.length < 2 ? "bg-gray-400" : "bg-blue-600"} text-base font-medium text-left text-white hover:cursor-pointer" %>
<% end %>
</div>
<% end %>

0 comments on commit 63f58df

Please sign in to comment.