decidim-elections 0.25.0.rc4 → 0.26.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/elections/election_m_cell.rb +1 -1
  3. data/app/cells/decidim/votings/content_blocks/highlighted_votings_cell.rb +12 -0
  4. data/app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb +1 -1
  5. data/app/cells/decidim/votings/voting_m_cell.rb +1 -1
  6. data/app/commands/decidim/elections/admin/add_user_as_trustee.rb +1 -1
  7. data/app/commands/decidim/elections/admin/report_missing_trustee.rb +68 -0
  8. data/app/commands/decidim/elections/admin/setup_election.rb +1 -1
  9. data/app/commands/decidim/elections/admin/start_tally.rb +1 -1
  10. data/app/commands/decidim/votings/admin/create_ballot_style.rb +8 -5
  11. data/app/commands/decidim/votings/admin/create_monitoring_committee_member.rb +1 -1
  12. data/app/commands/decidim/votings/admin/create_polling_officer.rb +1 -1
  13. data/app/commands/decidim/votings/admin/destroy_ballot_style.rb +11 -3
  14. data/app/commands/decidim/votings/admin/update_ballot_style.rb +6 -1
  15. data/app/commands/decidim/votings/census/admin/create_dataset.rb +13 -5
  16. data/app/controllers/concerns/decidim/monitoring_committee_polling_station_closures/admin/filterable.rb +1 -1
  17. data/app/controllers/concerns/decidim/polling_stations/admin/filterable.rb +1 -1
  18. data/app/controllers/decidim/elections/admin/steps_controller.rb +26 -7
  19. data/app/controllers/decidim/votings/admin/ballot_styles_controller.rb +1 -1
  20. data/app/forms/decidim/elections/admin/action_form.rb +4 -0
  21. data/app/forms/decidim/elections/admin/report_missing_trustee_form.rb +22 -0
  22. data/app/forms/decidim/elections/admin/setup_form.rb +4 -0
  23. data/app/models/decidim/elections/action.rb +1 -1
  24. data/app/models/decidim/elections/trustee.rb +4 -0
  25. data/app/models/decidim/votings/ballot_style.rb +6 -0
  26. data/app/models/decidim/votings/census/dataset.rb +2 -0
  27. data/app/models/decidim/votings/monitoring_committee_member.rb +6 -0
  28. data/app/models/decidim/votings/polling_officer.rb +5 -0
  29. data/app/models/decidim/votings/polling_station.rb +6 -0
  30. data/app/packs/entrypoints/decidim_elections_admin_trustees_process.js +1 -0
  31. data/app/packs/src/decidim/elections/admin/pending_action.js +1 -1
  32. data/app/packs/src/decidim/elections/admin/trustees_process.js +125 -0
  33. data/app/packs/src/decidim/elections/election_log.js +89 -73
  34. data/app/packs/src/decidim/elections/trustee/key_ceremony.js +3 -3
  35. data/app/packs/src/decidim/elections/trustee/tally.js +3 -3
  36. data/app/packs/src/decidim/elections/trustee/trustee_zone.js +29 -18
  37. data/app/packs/src/decidim/elections/voter/casting-vote.js +1 -1
  38. data/app/packs/src/decidim/elections/voter/setup-vote.js +5 -5
  39. data/app/packs/src/decidim/elections/voter/verify-vote.js +1 -1
  40. data/app/packs/src/decidim/votings/in-person-vote.js +1 -1
  41. data/app/presenters/decidim/elections/admin_log/election_presenter.rb +34 -9
  42. data/app/presenters/decidim/elections/admin_log/trustee_presenter.rb +50 -0
  43. data/app/presenters/decidim/elections/trustee_presenter.rb +5 -1
  44. data/app/presenters/decidim/votings/admin_log/ballot_style_presenter.rb +35 -0
  45. data/app/presenters/decidim/votings/admin_log/monitoring_committee_member_presenter.rb +50 -0
  46. data/app/presenters/decidim/votings/admin_log/polling_officer_presenter.rb +50 -0
  47. data/app/presenters/decidim/votings/admin_log/polling_station_presenter.rb +29 -0
  48. data/app/presenters/decidim/votings/admin_log/voting_presenter.rb +1 -1
  49. data/app/presenters/decidim/votings/census/admin_log/dataset_presenter.rb +7 -6
  50. data/app/services/decidim/votings/voting_search.rb +2 -2
  51. data/app/views/decidim/elections/admin/steps/_create_election.html.erb +3 -3
  52. data/app/views/decidim/elections/admin/steps/_key_ceremony.html.erb +44 -9
  53. data/app/views/decidim/elections/admin/steps/_tally.html.erb +60 -10
  54. data/app/views/decidim/elections/admin/steps/index.html.erb +17 -15
  55. data/app/views/decidim/elections/elections/_filters_small_view.html.erb +3 -3
  56. data/app/views/decidim/elections/elections/election_log.html.erb +1 -1
  57. data/app/views/decidim/elections/elections/show.html.erb +1 -1
  58. data/app/views/decidim/elections/trustee_zone/elections/show.html.erb +1 -1
  59. data/app/views/decidim/elections/trustee_zone/trustees/show.html.erb +1 -1
  60. data/app/views/decidim/elections/votes/_onboarding_modal.html.erb +1 -1
  61. data/app/views/decidim/elections/votes/_show_casted.html.erb +1 -1
  62. data/app/views/decidim/elections/votes/_show_casting.html.erb +1 -1
  63. data/app/views/decidim/elections/votes/new.html.erb +3 -3
  64. data/app/views/decidim/elections/votes/verify.html.erb +1 -1
  65. data/app/views/decidim/votings/admin/votings/index.html.erb +1 -1
  66. data/app/views/decidim/votings/polling_officer_zone/closures/_modal_ballots_count_error.html.erb +3 -2
  67. data/app/views/decidim/votings/polling_officer_zone/closures/_modal_ballots_results_count_error.html.erb +3 -2
  68. data/app/views/decidim/votings/polling_officer_zone/closures/_sign_form.html.erb +4 -3
  69. data/app/views/decidim/votings/polling_officer_zone/closures/edit.html.erb +1 -1
  70. data/app/views/decidim/votings/polling_officer_zone/closures/new.html.erb +1 -1
  71. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/new.html.erb +1 -1
  72. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/show.html.erb +1 -1
  73. data/app/views/decidim/votings/votings/_filters_small_view.html.erb +3 -3
  74. data/app/views/decidim/votings/votings/_promoted_voting.html.erb +1 -1
  75. data/config/assets.rb +1 -0
  76. data/config/locales/ca.yml +67 -80
  77. data/config/locales/cs.yml +41 -11
  78. data/config/locales/de.yml +0 -13
  79. data/config/locales/en.yml +41 -11
  80. data/config/locales/es-MX.yml +151 -13
  81. data/config/locales/es-PY.yml +151 -13
  82. data/config/locales/es.yml +192 -11
  83. data/config/locales/eu.yml +1344 -0
  84. data/config/locales/fi-plain.yml +41 -11
  85. data/config/locales/fi.yml +41 -11
  86. data/config/locales/fr-CA.yml +124 -5
  87. data/config/locales/fr.yml +124 -5
  88. data/config/locales/ga-IE.yml +371 -0
  89. data/config/locales/gl.yml +34 -1
  90. data/config/locales/it.yml +33 -11
  91. data/config/locales/ja.yml +545 -16
  92. data/config/locales/lb-LU.yml +24 -0
  93. data/config/locales/lb.yml +25 -0
  94. data/config/locales/nl.yml +224 -6
  95. data/config/locales/pl.yml +6 -11
  96. data/config/locales/pt-BR.yml +1 -14
  97. data/config/locales/pt.yml +1169 -2
  98. data/config/locales/ro-RO.yml +267 -51
  99. data/config/locales/sv.yml +89 -8
  100. data/config/locales/tr-TR.yml +0 -4
  101. data/config/locales/val-ES.yml +1 -0
  102. data/config/locales/zh-CN.yml +0 -4
  103. data/lib/decidim/elections/component.rb +2 -1
  104. data/lib/decidim/elections/engine.rb +4 -0
  105. data/lib/decidim/elections/test/factories.rb +2 -2
  106. data/lib/decidim/elections/version.rb +1 -1
  107. metadata +33 -22
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Votings
5
+ module AdminLog
6
+ # This class holds the logic to present a `Decidim::Votings::Voting`
7
+ # for the `AdminLog` log.
8
+ #
9
+ # Usage should be automatic and you shouldn't need to call this class
10
+ # directly, but here's an example:
11
+ #
12
+ # action_log = Decidim::ActionLog.last
13
+ # view_helpers # => this comes from the views
14
+ # BallotStylePresenter.new(action_log, view_helpers).present
15
+ class BallotStylePresenter < Decidim::Log::BasePresenter
16
+ private
17
+
18
+ def i18n_params
19
+ super.merge(
20
+ ballot_style_code: action_log.resource.code
21
+ )
22
+ end
23
+
24
+ def action_string
25
+ case action
26
+ when "create", "delete", "update"
27
+ "decidim.votings.admin_log.ballot_style.#{action}"
28
+ else
29
+ super
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Votings
5
+ module AdminLog
6
+ # This class holds the logic to present a `Decidim::Votings::Voting`
7
+ # for the `AdminLog` log.
8
+ #
9
+ # Usage should be automatic and you shouldn't need to call this class
10
+ # directly, but here's an example:
11
+ #
12
+ # action_log = Decidim::ActionLog.last
13
+ # view_helpers # => this comes from the views
14
+ # MonitoringCommitteeMemberPresenter.new(action_log, view_helpers).present
15
+ class MonitoringCommitteeMemberPresenter < Decidim::Log::BasePresenter
16
+ private
17
+
18
+ def monitoring_committee_member_user
19
+ @monitoring_committee_member_user ||= action_log.resource&.user
20
+ end
21
+
22
+ def monitoring_committee_member_user_extra
23
+ {
24
+ "name" => monitoring_committee_member_user.name,
25
+ "nickname" => monitoring_committee_member_user.nickname
26
+ }
27
+ end
28
+
29
+ def monitoring_committee_member_user_presenter
30
+ @monitoring_committee_member_user_presenter ||= Decidim::Log::UserPresenter.new(monitoring_committee_member_user, h, monitoring_committee_member_user_extra)
31
+ end
32
+
33
+ def i18n_params
34
+ super.merge(
35
+ monitoring_committee_member_user: monitoring_committee_member_user.present? ? monitoring_committee_member_user_presenter.present : resource_presenter.try(:present)
36
+ )
37
+ end
38
+
39
+ def action_string
40
+ case action
41
+ when "create", "delete"
42
+ "decidim.votings.admin_log.monitoring_committee_member.#{action}"
43
+ else
44
+ super
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Votings
5
+ module AdminLog
6
+ # This class holds the logic to present a `Decidim::Votings::Voting`
7
+ # for the `AdminLog` log.
8
+ #
9
+ # Usage should be automatic and you shouldn't need to call this class
10
+ # directly, but here's an example:
11
+ #
12
+ # action_log = Decidim::ActionLog.last
13
+ # view_helpers # => this comes from the views
14
+ # PollingOfficerPresenter.new(action_log, view_helpers).present
15
+ class PollingOfficerPresenter < Decidim::Log::BasePresenter
16
+ private
17
+
18
+ def polling_officer_user
19
+ @polling_officer_user ||= action_log.resource&.user
20
+ end
21
+
22
+ def polling_officer_user_extra
23
+ {
24
+ "name" => polling_officer_user.name,
25
+ "nickname" => polling_officer_user.nickname
26
+ }
27
+ end
28
+
29
+ def polling_officer_user_presenter
30
+ @polling_officer_user_presenter ||= Decidim::Log::UserPresenter.new(polling_officer_user, h, polling_officer_user_extra)
31
+ end
32
+
33
+ def i18n_params
34
+ super.merge(
35
+ polling_officer_user: polling_officer_user.present? ? polling_officer_user_presenter.present : resource_presenter.try(:present)
36
+ )
37
+ end
38
+
39
+ def action_string
40
+ case action
41
+ when "create", "delete"
42
+ "decidim.votings.admin_log.polling_officer.#{action}"
43
+ else
44
+ super
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Votings
5
+ module AdminLog
6
+ # This class holds the logic to present a `Decidim::Votings::Voting`
7
+ # for the `AdminLog` log.
8
+ #
9
+ # Usage should be automatic and you shouldn't need to call this class
10
+ # directly, but here's an example:
11
+ #
12
+ # action_log = Decidim::ActionLog.last
13
+ # view_helpers # => this comes from the views
14
+ # PollingStationPresenter.new(action_log, view_helpers).present
15
+ class PollingStationPresenter < Decidim::Log::BasePresenter
16
+ private
17
+
18
+ def action_string
19
+ case action
20
+ when "create", "delete", "update"
21
+ "decidim.votings.admin_log.polling_station.#{action}"
22
+ else
23
+ super
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -11,7 +11,7 @@ module Decidim
11
11
  #
12
12
  # action_log = Decidim::ActionLog.last
13
13
  # view_helpers # => this comes from the views
14
- # ElectionPresenter.new(action_log, view_helpers).present
14
+ # VotingPresenter.new(action_log, view_helpers).present
15
15
  class VotingPresenter < Decidim::Log::BasePresenter
16
16
  private
17
17
 
@@ -16,12 +16,13 @@ module Decidim
16
16
  class DatasetPresenter < Decidim::Log::BasePresenter
17
17
  private
18
18
 
19
- def i18n_params
20
- {
21
- user_name: user_presenter.present,
22
- resource_name: Dataset.model_name.human,
23
- space_name: space_presenter.present
24
- }
19
+ def action_string
20
+ case action
21
+ when "create", "delete", "update"
22
+ "decidim.votings.admin_log.census.#{action}"
23
+ else
24
+ super
25
+ end
25
26
  end
26
27
  end
27
28
  end
@@ -18,9 +18,9 @@ module Decidim
18
18
  # Handle the search_text filter
19
19
  def search_search_text
20
20
  query
21
- .where("title->>'#{current_locale}' ILIKE ?", "%#{search_text}%")
21
+ .where(Arel.sql("title->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
22
22
  .or(
23
- query.where("description->>'#{current_locale}' ILIKE ?", "%#{search_text}%")
23
+ query.where(Arel.sql("description->>'#{current_locale}' ILIKE ?").to_s, "%#{search_text}%")
24
24
  )
25
25
  end
26
26
 
@@ -7,9 +7,9 @@
7
7
  <ul class="no-bullet-indented">
8
8
  <% form.messages.each do |key, value| %>
9
9
  <% if form.errors.include?(key) %>
10
- <li><%= icon "x", role: "img", "aria-hidden": true %>&nbsp;<%= form.errors.messages[key][0].html_safe %></li>
10
+ <li><%= icon "x", class: "text-alert", role: "img", "aria-hidden": true %>&nbsp;<%= form.errors.messages[key][0].html_safe %></li>
11
11
  <% else %>
12
- <li><%= icon "check", role: "img", "aria-hidden": true %>&nbsp;<%= value.html_safe %></li>
12
+ <li><%= icon "check", class: "text-success", role: "img", "aria-hidden": true %>&nbsp;<%= value.html_safe %></li>
13
13
  <% end %>
14
14
  <% end %>
15
15
  </ul>
@@ -24,7 +24,7 @@
24
24
  .sort_by {|trustee, used| used ? 0 : 1}
25
25
  .each do |trustee, used| %>
26
26
  <li <%= "class=text-muted" if !used %>>
27
- <%= icon trustee.public_key ? "check" : "x", role: "img", "aria-hidden": true %>
27
+ <%= icon trustee.public_key ? "check" : "x", class: "text-#{trustee.public_key ? "success": "alert"}", role: "img", "aria-hidden": true %>
28
28
  <%= trustee.user.name || trustee.name %> <%= t(".public_key.#{used}").html_safe %>
29
29
  <% if used %>
30
30
  <%= f.hidden_field :trustee_ids, multiple: true, value: trustee.id %>
@@ -3,14 +3,49 @@
3
3
  <h2 class="card-title"><%= t(".title") %></h2>
4
4
  </div>
5
5
 
6
- <div class="card-section">
7
- <h4><%= t(".trustees") %></h4>
8
- <ul>
9
- <% election.trustees.each do |trustee| %>
10
- <li>
11
- <%= trustee.name %>
12
- </li>
13
- <% end %>
14
- </ul>
6
+ <div id="trustees_process" class="card-section"
7
+ data-api-endpoint-url="<%= bulletin_board_server %>"
8
+ data-authority-public-key="<%= authority_public_key %>"
9
+ data-process-type="key_ceremony"
10
+ data-election-unique-id="<%= election_unique_id %>">
11
+ <div class="table-scroll">
12
+ <table class="table-list">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t("models.trustees_participatory_space.fields.name", scope: "decidim.elections") %></th>
16
+ <th><%= t("models.trustees_participatory_space.fields.status", scope: "decidim.elections") %></th>
17
+ <th><%= t("models.trustees_participatory_space.fields.email", scope: "decidim.elections") %></th>
18
+ <th><%= t("models.trustees_participatory_space.fields.public_key", scope: "decidim.elections") %></th>
19
+ <th></th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <% election.trustees.each do |trustee| %>
24
+ <tr class="trustee loading" data-trustee-id="<%= trustee.id %>" data-trustee-slug="<%= trustee.slug %>">
25
+ <td>
26
+ <%= trustee.name %>
27
+ </td>
28
+ <td>
29
+ <div class="loading"><span class="loading-spinner"></span></div>
30
+ <div class="active hide"><%= icon "task", class: "text-success" %></div>
31
+ </td>
32
+ <td>
33
+ <%= trustee.user.email %>
34
+ </td>
35
+ <td>
36
+ <%= present(trustee).public_key_thumbprint %>
37
+ </td>
38
+ <td></td>
39
+ </tr>
40
+ <% end %>
41
+ </tbody>
42
+ </table>
43
+ </div>
15
44
  </div>
16
45
  </div>
46
+
47
+ <div class="button--double form-general-submit">
48
+ <%= link_to t("steps.key_ceremony.continue", scope: "decidim.elections.admin"), election_steps_path(election), class: "button disabled js-continue-link" %>
49
+ </div>
50
+
51
+ <%= javascript_pack_tag "decidim_elections_admin_trustees_process" %>
@@ -3,15 +3,65 @@
3
3
  <h2 class="card-title"><%= t(".title") %></h2>
4
4
  </div>
5
5
 
6
- <div class="card-section">
7
- <h4><%= t(".trustees") %></h4>
8
- <ul>
9
- <% election.trustees.each do |trustee| %>
10
- <li>
11
- <%= trustee.name %>
12
- </li>
13
- <% end %>
14
- </ul>
15
- </div>
6
+ <div id="trustees_process" class="card-section"
7
+ data-api-endpoint-url="<%= bulletin_board_server %>"
8
+ data-authority-public-key="<%= authority_public_key %>"
9
+ data-process-type="tally"
10
+ data-election-unique-id="<%= election_unique_id %>"
11
+ data-missing-trustees-allowed="<%= missing_trustees_allowed %>"
12
+ data-check-pending-action-path="<%= election_step_path(election, current_step, check_pending_action: 1) %>">
13
+
14
+ <% if missing_trustees_allowed > 0 %>
15
+ <ul>
16
+ <%= content_tag :li, t(".mark_as_missing_description") %>
17
+ <%= content_tag :li, t(".tally_completion", quorum: quorum) %>
18
+ <%= content_tag :li, t(".undo_mark_as_missing") %>
19
+ </ul>
20
+ <% end %>
21
+ <div class="table-scroll">
22
+ <table class="table-list">
23
+ <thead>
24
+ <tr>
25
+ <th><%= t("models.trustees_participatory_space.fields.name", scope: "decidim.elections") %></th>
26
+ <th><%= t("models.trustees_participatory_space.fields.status", scope: "decidim.elections") %></th>
27
+ <th><%= t("models.trustees_participatory_space.fields.email", scope: "decidim.elections") %></th>
28
+ <th><%= t("models.trustees_participatory_space.fields.public_key", scope: "decidim.elections") %></th>
29
+ <th></th>
30
+ </tr>
31
+ </thead>
32
+ <tbody>
33
+ <% election.trustees.each do |trustee| %>
34
+ <tr class="trustee loading" data-trustee-id="<%= trustee.id %>" data-trustee-slug="<%= trustee.slug %>">
35
+ <td>
36
+ <%= trustee.name %>
37
+ </td>
38
+ <td>
39
+ <div class="loading"><span class="loading-spinner"></span></div>
40
+ <div class="active hide"><%= icon "task", class: "text-success" %></div>
41
+ <div class="missing hide"><%= icon "x", class: "text-alert" %></div>
42
+ </td>
43
+ <td>
44
+ <%= trustee.user.email %>
45
+ </td>
46
+ <td>
47
+ <%= present(trustee).public_key_thumbprint %>
48
+ </td>
49
+ <td class="table-list__actions">
50
+ <%= f.button type: :button, formaction: election_step_path(election, current_step, trustee_id: trustee.id),
51
+ class: "button tiny alert hollow hide js-report-missing-trustee" do %>
52
+ <%= icon "circle-x" %> <%= t(".mark_as_missing") %>
53
+ <% end %>
54
+ </td>
55
+ </tr>
56
+ <% end %>
57
+ </tbody>
58
+ </table>
59
+ </div>
16
60
  </div>
17
61
  </div>
62
+
63
+ <div class="button--double form-general-submit">
64
+ <%= link_to t("steps.tally.continue", scope: "decidim.elections.admin"), election_steps_path(election), class: "button disabled js-continue-link" %>
65
+ </div>
66
+
67
+ <%= javascript_pack_tag "decidim_elections_admin_trustees_process" %>
@@ -17,23 +17,25 @@
17
17
  <%= decidim_form_for(@form, url: election_step_path(election, current_step), method: :patch, html: { class: "form step #{current_step}" }) do |f| %>
18
18
  <%= render partial: current_step.to_s, locals: { form: @form, f: f } %>
19
19
 
20
- <div class="button--double form-general-submit">
21
- <%= f.hidden_field :current_step %>
22
- <%= f.button type: :submit, class: "button", disabled: @form.invalid? do %>
23
- <% if @form.pending_action %>
24
- <span class='loading-spinner'></span> <%= t("steps.processing", scope: "decidim.elections.admin") %>
25
- <% else %>
26
- <%= t("steps.#{current_step}.submit", scope: "decidim.elections.admin") %>
27
- <% end %>
28
- <% end %>
29
- </div>
20
+ <%= f.hidden_field :current_step %>
30
21
 
31
- <% if @form.pending_action %>
32
- <div id="pending_action"
33
- data-api-endpoint-url="<%= bulletin_board_server %>"
34
- data-message-id="<%= @form.pending_action.message_id %>"></div>
22
+ <% if @form.main_button? %>
23
+ <div class="button--double form-general-submit">
24
+ <%= f.button type: :submit, class: "button", disabled: @form.invalid? do %>
25
+ <% if @form.pending_action %>
26
+ <span class='loading-spinner'></span> <%= t("steps.processing", scope: "decidim.elections.admin") %>
27
+ <% else %>
28
+ <%= t("steps.#{current_step}.submit", scope: "decidim.elections.admin") %>
29
+ <% end %>
30
+ <% end %>
31
+ </div>
32
+ <% if @form.pending_action %>
33
+ <div id="pending_action"
34
+ data-api-endpoint-url="<%= bulletin_board_server %>"
35
+ data-message-id="<%= @form.pending_action.message_id %>"></div>
35
36
 
36
- <%= javascript_pack_tag "decidim_elections_admin_pending_action" %>
37
+ <%= javascript_pack_tag "decidim_elections_admin_pending_action" %>
38
+ <% end %>
37
39
  <% end %>
38
40
  <% end %>
39
41
  <% else %>
@@ -1,13 +1,13 @@
1
1
  <div class="filters-controls hide-for-mediumlarge">
2
- <button data-open="filter-box" class="filters-controls__trigger">
2
+ <button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
3
3
  <%= t ".filter" %>
4
4
  <%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
5
5
  </button>
6
6
  </div>
7
7
 
8
- <div class="reveal" id="filter-box" data-reveal>
8
+ <div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
9
9
  <div class="reveal__header">
10
- <h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
10
+ <h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
11
11
  <button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
12
12
  <span aria-hidden="true">&times;</span>
13
13
  </button>
@@ -179,4 +179,4 @@
179
179
  </div>
180
180
  </div>
181
181
 
182
- <%= javascript_pack_tag "decidim_elections_election_log", integrity: true %>
182
+ <%= javascript_pack_tag "decidim_elections_election_log" %>
@@ -45,7 +45,7 @@ edit_link(
45
45
  <% end %>
46
46
  <div class="columns medium-8 mediumlarge-7">
47
47
  <div class="section">
48
- <p><%= decidim_sanitize(simple_format(translated_attribute(election.description)), strip_tags: true) %></p>
48
+ <p><%= decidim_sanitize_editor(simple_format(translated_attribute(election.description)), strip_tags: true) %></p>
49
49
 
50
50
  <%= cell("decidim/elections/election_vote_cta", election) %>
51
51
 
@@ -18,5 +18,5 @@
18
18
  <%= render("#{current_step}_steps") %>
19
19
  </div>
20
20
 
21
- <%= javascript_pack_tag "decidim_elections_trustee_#{current_step}", integrity: true %>
21
+ <%= javascript_pack_tag "decidim_elections_trustee_#{current_step}" %>
22
22
  <% end %>
@@ -99,4 +99,4 @@
99
99
  <% end %>
100
100
  </div>
101
101
 
102
- <%= javascript_pack_tag "decidim_elections_trustee_trustee_zone", integrity: true %>
102
+ <%= javascript_pack_tag "decidim_elections_trustee_trustee_zone" %>
@@ -20,4 +20,4 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <%= javascript_pack_tag "decidim_elections_onboarding", integrity: true %>
23
+ <%= javascript_pack_tag "decidim_elections_onboarding" %>
@@ -8,7 +8,7 @@
8
8
 
9
9
  <h2 class="h4"><%= t("decidim.elections.votes.confirmed.lead") %></h2>
10
10
  <div class="evote__content">
11
- <%= t("decidim.elections.votes.confirmed.text", e_vote_poll_id: params[:id]).html_safe %>
11
+ <%= t("decidim.elections.votes.confirmed.text", e_vote_poll_id: h(params[:id])).html_safe %>
12
12
  <p>
13
13
  <%= t("decidim.elections.votes.confirmed.verify_link", link: election_vote_verify_path(election, vote_id: params[:id])).html_safe %>
14
14
  </p>
@@ -22,4 +22,4 @@
22
22
  <%= form_tag election_vote_path(election, id: vote.encrypted_vote_hash), method: :patch, class: "update_vote_status" %>
23
23
  </div>
24
24
 
25
- <%= javascript_pack_tag "decidim_elections_voter_casting_vote", integrity: true %>
25
+ <%= javascript_pack_tag "decidim_elections_voter_casting_vote" %>
@@ -58,8 +58,8 @@
58
58
  </div>
59
59
 
60
60
  <% if preview_mode? %>
61
- <%= javascript_pack_tag "decidim_elections_voter_setup_preview", integrity: true %>
61
+ <%= javascript_pack_tag "decidim_elections_voter_setup_preview" %>
62
62
  <% else %>
63
- <%= javascript_pack_tag "decidim_elections_voter_setup_vote", integrity: true %>
63
+ <%= javascript_pack_tag "decidim_elections_voter_setup_vote" %>
64
64
  <% end %>
65
- <%= javascript_pack_tag "decidim_elections_voter_new_vote", integrity: true %>
65
+ <%= javascript_pack_tag "decidim_elections_voter_new_vote" %>
@@ -72,4 +72,4 @@
72
72
 
73
73
  </div>
74
74
 
75
- <%= javascript_pack_tag "decidim_elections_voter_verify_vote", integrity: true %>
75
+ <%= javascript_pack_tag "decidim_elections_voter_verify_vote" %>
@@ -26,7 +26,7 @@
26
26
  <tr>
27
27
  <td>
28
28
  <% if voting.promoted? %>
29
- <span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.voting.fields.promoted", scope: "decidim.votings.admin") %>">
29
+ <span data-tooltip class="icon-state icon-highlight" data-disable-hover="false" title="<%= t("models.voting.fields.promoted", scope: "decidim.votings.admin") %>">
30
30
  <%= icon "star" %>
31
31
  </span>
32
32
  <% end %>
@@ -1,9 +1,10 @@
1
1
  <div id="wrapper-modal-closure-count-error">
2
- <div class="reveal" data-reveal id="modal-closure-count-error" data-append-to="div#wrapper-modal-closure-count-error">
2
+ <div class="reveal" data-reveal id="modal-closure-count-error" data-append-to="div#wrapper-modal-closure-count-error" role="dialog" aria-modal="true" aria-labelledby="modal-closure-count-error-label">
3
3
  <div class="reveal__header">
4
4
  <%= content_tag :h3,
5
5
  t("title", scope: "decidim.votings.polling_officer_zone.closures.new.modal_ballots_count_error"),
6
- class: "reveal__title" %>
6
+ class: "reveal__title",
7
+ id: "modal-closure-count-error-label" %>
7
8
 
8
9
  <button class="close-button" data-close aria-label="<%= t("close_modal", scope: "decidim.votings.polling_officer_zone.closures.new.modal_ballots_count_error") %>" type="button">
9
10
  <span aria-hidden="true">×</span>
@@ -1,8 +1,9 @@
1
- <div class="reveal" data-reveal id="modal-closure-results-count-error">
1
+ <div class="reveal" data-reveal id="modal-closure-results-count-error" role="dialog" aria-modal="true" aria-labelledby="modal-closure-results-count-error-label">
2
2
  <div class="reveal__header">
3
3
  <%= content_tag :h3,
4
4
  t("title", scope: "decidim.votings.polling_officer_zone.closures.edit.modal_ballots_results_count_error"),
5
- class: "reveal__title" %>
5
+ class: "reveal__title",
6
+ id: "modal-closure-results-count-error-label" %>
6
7
 
7
8
  <button class="close-button" data-close aria-label="<%= t("close_modal", scope: "decidim.votings.polling_officer_zone.closures.edit.modal_ballots_results_count_error") %>" type="button">
8
9
  <span aria-hidden="true">×</span>
@@ -15,17 +15,18 @@
15
15
  data: { open: "modal-closure-sign" },
16
16
  aria: {
17
17
  controls: "modal-closure-sign",
18
- haspopup: true
18
+ haspopup: "dialog"
19
19
  },
20
20
  disabled: true,
21
21
  tabindex: "0" %>
22
22
 
23
23
  <div id="wrapper-modal-closure-sign">
24
- <div class="reveal" data-reveal id="modal-closure-sign" data-append-to="div#wrapper-modal-closure-sign">
24
+ <div class="reveal" data-reveal id="modal-closure-sign" data-append-to="div#wrapper-modal-closure-sign" role="dialog" aria-modal="true" aria-labelledby="modal-closure-sign-label">
25
25
  <div class="reveal__header">
26
26
  <%= content_tag :h3,
27
27
  t("title", scope: "decidim.votings.polling_officer_zone.closures.sign"),
28
- class: "reveal__title" %>
28
+ class: "reveal__title",
29
+ id: "modal-closure-sign-label" %>
29
30
 
30
31
  <button class="close-button" data-close aria-label="<%= t("close_modal", scope: "decidim.votings.polling_officer_zone.closures.sign") %>" type="button">
31
32
  <span aria-hidden="true">×</span>
@@ -39,7 +39,7 @@
39
39
  data: { open: "modal-closure-results-count-error" },
40
40
  aria: {
41
41
  controls:"modal-closure-results-count-error",
42
- haspopup: "true"
42
+ haspopup: "dialog"
43
43
  } %>
44
44
  <% end %>
45
45
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  <%= render "modal_ballots_count_error", form: form %>
50
50
 
51
- <button id="btn-modal-closure-count-error" class="button button--sc expanded mt-sm mb-none hide" data-open="modal-closure-count-error" aria-controls="modal-closure-count-error" aria-haspopup="true" tabindex="0">
51
+ <button id="btn-modal-closure-count-error" class="button button--sc expanded mt-sm mb-none hide" data-open="modal-closure-count-error" aria-controls="modal-closure-count-error" aria-haspopup="dialog" tabindex="0">
52
52
  <%= t(".submit") %>
53
53
  </button>
54
54
  <% end %>
@@ -18,4 +18,4 @@
18
18
  <% end %>
19
19
  </div>
20
20
 
21
- <%= javascript_pack_tag "decidim_votings_in_person_vote", integrity: true %>
21
+ <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
@@ -22,4 +22,4 @@
22
22
  <%= form_tag polling_officer_election_in_person_vote_path(polling_officer, election, in_person_vote), method: :patch, class: "update_vote_status" %>
23
23
  </div>
24
24
 
25
- <%= javascript_pack_tag "decidim_votings_in_person_vote", integrity: true %>
25
+ <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
@@ -1,5 +1,5 @@
1
1
  <div class="filters-controls hide-for-mediumlarge">
2
- <button data-open="filter-box" class="filters-controls__trigger">
2
+ <button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
3
3
  <%= t ".filter" %>
4
4
  <%= icon "caret-bottom",
5
5
  class: "icon--small float-right",
@@ -8,9 +8,9 @@
8
8
  </button>
9
9
  </div>
10
10
 
11
- <div class="reveal" id="filter-box" data-reveal>
11
+ <div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
12
12
  <div class="reveal__header">
13
- <h3 class="reveal__title"><%= t ".filter_by" %>:</h3>
13
+ <h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
14
14
  <button class="close-button" data-close
15
15
  aria-label="<%= t(".close_modal") %>"
16
16
  type="button">
@@ -5,7 +5,7 @@
5
5
  <%= link_to voting_path(promoted_voting), class: "card__link" do %>
6
6
  <h2 class="card__title"><%= translated_attribute promoted_voting.title %></h2>
7
7
  <% end %>
8
- <%= decidim_sanitize html_truncate(translated_attribute(promoted_voting.description), length: 630, separator: "...") %>
8
+ <%= decidim_sanitize_editor html_truncate(translated_attribute(promoted_voting.description), length: 630, separator: "...") %>
9
9
  <%= link_to voting_path(promoted_voting), class: "button small hollow card__button" do %>
10
10
  <%= t("votings.promoted_voting.more_info", scope: "layouts.decidim") %>
11
11
  <% end %>