Skip to content

Commit

Permalink
Removed "disabled" status from proposals' main categories (#10274)
Browse files Browse the repository at this point in the history
* removed-main-category-disabling

* fixed-a-typo

Co-authored-by: JoonasAapro <110532525+JoonasAapro@users.noreply.github.com>
  • Loading branch information
alecslupu and JoonasAapro committed Jan 30, 2023
1 parent 0a78d6b commit 7f4215f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Expand Up @@ -10,9 +10,8 @@ module BulkActionsHelper
# Returns a String.
def bulk_categories_select(collection)
categories = bulk_categories_for_select collection
disabled = bulk_disabled_categories_for collection
prompt = t("decidim.proposals.admin.proposals.index.change_category")
select(:category, :id, options_for_select(categories, selected: [], disabled: disabled), prompt: prompt)
select(:category, :id, options_for_select(categories, selected: []), prompt: prompt)
end

def bulk_categories_for_select(scope)
Expand All @@ -35,10 +34,6 @@ def bulk_categories_for_select(scope)
end
end

def bulk_disabled_categories_for(scope)
scope.first_class.joins(:subcategories).pluck(:id)
end

# Public: Generates a select field with the components.
#
# siblings - A collection of components.
Expand Down
Expand Up @@ -59,7 +59,7 @@
end
end

context "when the proposal has attachement" do
context "when the proposal has attachment" do
let!(:component) do
create(:proposal_component,
:with_creation_enabled,
Expand Down

0 comments on commit 7f4215f

Please sign in to comment.