Skip to content

Commit

Permalink
fix modal title
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Nov 2, 2023
1 parent ed1776d commit 4979640
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
voted_for?(0) ? t("decidim.decidim_awesome.voting.voting_cards.abstained") : proposal.manifest.label_for(0),
proposal_vote_path(0),
link_options(0).merge({
title: t("decidim.decidim_awesome.voting.voting_cards.voting_for", type: proposal.manifest.label_for(0)),
title: t("decidim.decidim_awesome.voting.voting_cards.voting_for", proposal: translated_attribute(proposal.title), type: proposal.manifest.label_for(0)),
class: "button expanded vote-action abstain-button small #{classes_for(0)}"
}) %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
**link_options(weight) do %>
<span class="vote-label"><%= proposal.manifest.label_for(weight) %></span>
<%= content_tag :svg, role: "img" do
content_tag(:title, t("decidim.decidim_awesome.voting.voting_cards.voting_for", type: proposal.manifest.label_for(weight))) +
content_tag(:title, t("decidim.decidim_awesome.voting.voting_cards.voting_for", proposal: translated_attribute(proposal.title), type: proposal.manifest.label_for(weight))) +
content_tag(:use, "", "href" => svg_path(weight))
end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ en:
skip: Check here to skip this window in the future
vote_button: Click to vote
voted: Voted
voting_for: My vote is "%{type}"
voting_for: My vote is on "%{proposal}" is "%{type}"
weights:
a: A
g: G
Expand Down
4 changes: 2 additions & 2 deletions spec/system/voting_cards_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

click_link "Abstain"
within ".vote_proposal_modal" do
expect(page).to have_content('My vote is "Abstain"')
expect(page).to have_content("My vote on \"#{proposals_title}\" is \"Abstain\"")
expect(page).to have_content("Please read the election rules carefully to understand how your vote will be used by #{organization.name}")
click_button "Cancel"
end
Expand All @@ -64,7 +64,7 @@
click_link color
end
within ".vote_proposal_modal" do
expect(page).to have_content("My vote is \"#{color}\"")
expect(page).to have_content("My vote on \"#{proposals_title}\" is \"#{color}\"")
click_button "Cancel"
end
end
Expand Down

0 comments on commit 4979640

Please sign in to comment.