Skip to content

Commit

Permalink
fix: Fix button add vote in modal
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Jan 18, 2024
1 parent 1094f23 commit 37d9a0f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/cells/decidim/budgets/project_vote_button/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<%= action_authorized_button_to(
"vote",
budget_order_line_item_path(model.budget, project_id: model),
method: vote_button_method,
remote: true,
class: "button #{scale_up} #{selected_budget} customized-budget display-block project-vote-button",
data: {
add: !resource_added?,
disable: true,
budget: model.budget_amount,
project_id: model.id,
allocation: resource_allocation,
"redirect-url": budget_voting_index_path
},
disabled: vote_button_disabled?,
title: vote_button_label
) do %>
<%= resource_added? ? t("remove_from_vote", scope: "decidim.budgets.project_vote_button") :t("add_to_vote", scope: "decidim.budgets.project_vote_button") %>
<% end %>

0 comments on commit 37d9a0f

Please sign in to comment.