Merge pull request #1387 from consul/polls-officer-text
polls officer text
This commit is contained in:
@@ -508,3 +508,12 @@ table.investment-projects-summary {
|
||||
color: $color-alert;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table {
|
||||
|
||||
.callout {
|
||||
height: $line-height*2;
|
||||
line-height: $line-height*2;
|
||||
padding: 0 $line-height/2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<div class="callout warning inline-block">
|
||||
<%= t("officing.voters.show.error_already_voted") %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<div class="callout alert text-center">
|
||||
<strong><%= t("officing.voters.show.error_already_voted") %></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,14 @@
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= form_for @user, as: :voter, url: officing_voters_path, method: :post, remote: true do |f| %>
|
||||
<%= f.hidden_field :poll_id, value: poll.id %>
|
||||
<%= f.hidden_field :user_id, value: @user.id %>
|
||||
<%= f.submit t("officing.voters.show.submit"), class: "button success expanded" %>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 large-4 column">
|
||||
<div class="callout success text-center">
|
||||
<strong><%= t("officing.voters.show.can_vote") %></strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="small-12 medium-6 large-4 column end">
|
||||
<%= form_for @user, as: :voter, url: officing_voters_path, method: :post, remote: true do |f| %>
|
||||
<%= f.hidden_field :poll_id, value: poll.id %>
|
||||
<%= f.hidden_field :user_id, value: @user.id %>
|
||||
<%= f.submit t("officing.voters.show.submit"), class: "button success expanded" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,3 +1,7 @@
|
||||
<div class="callout success">
|
||||
<%= t("officing.voters.show.success") %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-8 column">
|
||||
<div class="callout primary text-center">
|
||||
<strong><%= t("officing.voters.show.success") %></strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,8 +64,9 @@ en:
|
||||
new:
|
||||
title: Polls
|
||||
table_poll: Poll
|
||||
table_actions: Validate
|
||||
table_actions: Polls status
|
||||
show:
|
||||
can_vote: Can vote
|
||||
error_already_voted: Has already participated in this poll
|
||||
submit: Validate vote
|
||||
success: Vote validated successfully.
|
||||
submit: Confirm vote
|
||||
success: "Vote introduced!"
|
||||
|
||||
@@ -64,8 +64,9 @@ es:
|
||||
new:
|
||||
title: Votaciones
|
||||
table_poll: Votación
|
||||
table_actions: Validar
|
||||
table_actions: Estado de las votaciones
|
||||
show:
|
||||
can_vote: Puede votar
|
||||
error_already_voted: "Ya ha participado en esta votación."
|
||||
submit: Validar voto
|
||||
success: Voto validado correctamente.
|
||||
submit: Confirmar voto
|
||||
success: "¡Voto introducido!"
|
||||
|
||||
@@ -21,14 +21,14 @@ feature 'Voters' do
|
||||
expect(page).to have_content "Polls"
|
||||
expect(page).to have_content poll.name
|
||||
|
||||
click_button "Validate vote"
|
||||
click_button "Confirm vote"
|
||||
|
||||
expect(page).to have_content "Vote validated successfully"
|
||||
expect(page).to_not have_button "Validate vote"
|
||||
expect(page).to have_content "Vote introduced!"
|
||||
expect(page).to_not have_button "Confirm vote"
|
||||
|
||||
page.evaluate_script("window.location.reload()")
|
||||
expect(page).to have_content "Has already participated in this poll"
|
||||
expect(page).to_not have_button "Validate vote"
|
||||
expect(page).to_not have_button "Confirm vote"
|
||||
end
|
||||
|
||||
scenario "Already voted", :js do
|
||||
@@ -42,11 +42,11 @@ feature 'Voters' do
|
||||
|
||||
within("#poll_#{poll1.id}") do
|
||||
expect(page).to have_content "Has already participated in this poll"
|
||||
expect(page).to_not have_button "Validate vote"
|
||||
expect(page).to_not have_button "Confirm vote"
|
||||
end
|
||||
|
||||
within("#poll_#{poll2.id}") do
|
||||
expect(page).to have_button "Validate vote"
|
||||
expect(page).to have_button "Confirm vote"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user