1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Add info about the disabled select

This commit is contained in:
Elvis Serrão 2025-01-28 13:31:28 -03:00
parent 2f708e55ac
commit 79ed958f64

View file

@ -35,6 +35,9 @@
<%= f.select :classification, [["Income", "income"], ["Expense", "expense"]], { label: "Classification" }, required: true %>
<%= f.text_field :name, placeholder: t(".placeholder"), required: true, autofocus: true, label: "Name", data: { color_avatar_target: "name" } %>
<%= f.select :parent_id, categories.pluck(:name, :id), { include_blank: "(unassigned)", label: "Parent category (optional)" }, disabled: category.parent? %>
<% if category.parent? %>
<span class="text-xs italic pl-2 text-gray-500">This category couldnt be assigned as a subcategory because it already has subcategories.</span>
<% end %>
</div>
</section>