decidim-elections 0.26.0 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/cells/decidim/elections/election_preview/show.erb +1 -1
  4. data/app/cells/decidim/elections/election_results/show.erb +1 -1
  5. data/app/cells/decidim/elections/election_vote_cta_cell.rb +8 -3
  6. data/app/cells/decidim/votings/content_blocks/highlighted_votings/show.erb +1 -1
  7. data/app/cells/decidim/votings/content_blocks/highlighted_votings_cell.rb +4 -4
  8. data/app/cells/decidim/votings/content_blocks/landing_page/description/show.erb +2 -12
  9. data/app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb +0 -8
  10. data/app/cells/decidim/votings/content_blocks/landing_page/header/show.erb +2 -2
  11. data/app/cells/decidim/votings/content_blocks/landing_page/header_cell.rb +1 -1
  12. data/app/cells/decidim/votings/content_blocks/landing_page/polling_stations/address.erb +1 -1
  13. data/app/commands/decidim/elections/admin/add_user_as_trustee.rb +22 -12
  14. data/app/commands/decidim/elections/admin/create_answer.rb +1 -1
  15. data/app/commands/decidim/elections/admin/create_election.rb +1 -1
  16. data/app/commands/decidim/elections/admin/create_question.rb +3 -7
  17. data/app/commands/decidim/elections/admin/destroy_answer.rb +1 -1
  18. data/app/commands/decidim/elections/admin/destroy_election.rb +1 -1
  19. data/app/commands/decidim/elections/admin/destroy_question.rb +1 -1
  20. data/app/commands/decidim/elections/admin/end_vote.rb +1 -1
  21. data/app/commands/decidim/elections/admin/import_proposals_to_elections.rb +1 -1
  22. data/app/commands/decidim/elections/admin/publish_election.rb +1 -1
  23. data/app/commands/decidim/elections/admin/publish_results.rb +1 -1
  24. data/app/commands/decidim/elections/admin/remove_trustee_from_participatory_space.rb +1 -1
  25. data/app/commands/decidim/elections/admin/report_missing_trustee.rb +1 -1
  26. data/app/commands/decidim/elections/admin/setup_election.rb +4 -2
  27. data/app/commands/decidim/elections/admin/start_key_ceremony.rb +1 -1
  28. data/app/commands/decidim/elections/admin/start_tally.rb +1 -1
  29. data/app/commands/decidim/elections/admin/start_vote.rb +1 -1
  30. data/app/commands/decidim/elections/admin/unpublish_election.rb +1 -1
  31. data/app/commands/decidim/elections/admin/update_action_status.rb +1 -1
  32. data/app/commands/decidim/elections/admin/update_answer.rb +1 -1
  33. data/app/commands/decidim/elections/admin/update_answer_selection.rb +1 -1
  34. data/app/commands/decidim/elections/admin/update_election.rb +1 -1
  35. data/app/commands/decidim/elections/admin/update_question.rb +1 -2
  36. data/app/commands/decidim/elections/admin/update_trustee_participatory_space.rb +1 -1
  37. data/app/commands/decidim/elections/trustee_zone/update_election_bulletin_board_status.rb +1 -1
  38. data/app/commands/decidim/elections/trustee_zone/update_trustee.rb +1 -1
  39. data/app/commands/decidim/elections/voter/cast_vote.rb +1 -1
  40. data/app/commands/decidim/elections/voter/update_vote_status.rb +2 -2
  41. data/app/commands/decidim/votings/admin/create_ballot_style.rb +1 -1
  42. data/app/commands/decidim/votings/admin/create_monitoring_committee_member.rb +1 -1
  43. data/app/commands/decidim/votings/admin/create_polling_officer.rb +1 -1
  44. data/app/commands/decidim/votings/admin/create_voting.rb +3 -2
  45. data/app/commands/decidim/votings/admin/destroy_ballot_style.rb +2 -2
  46. data/app/commands/decidim/votings/admin/destroy_monitoring_committee_member.rb +1 -1
  47. data/app/commands/decidim/votings/admin/destroy_polling_officer.rb +1 -1
  48. data/app/commands/decidim/votings/admin/destroy_polling_station.rb +1 -1
  49. data/app/commands/decidim/votings/admin/manage_polling_station.rb +2 -2
  50. data/app/commands/decidim/votings/admin/monitoring_committee_validate_polling_station_closure.rb +1 -1
  51. data/app/commands/decidim/votings/admin/publish_voting.rb +1 -1
  52. data/app/commands/decidim/votings/admin/unpublish_voting.rb +1 -1
  53. data/app/commands/decidim/votings/admin/update_ballot_style.rb +1 -1
  54. data/app/commands/decidim/votings/admin/update_voting.rb +3 -2
  55. data/app/commands/decidim/votings/census/admin/create_dataset.rb +22 -19
  56. data/app/commands/decidim/votings/census/admin/create_datum.rb +1 -1
  57. data/app/commands/decidim/votings/census/admin/destroy_dataset.rb +1 -1
  58. data/app/commands/decidim/votings/census/admin/increment_dataset_processed_rows.rb +1 -1
  59. data/app/commands/decidim/votings/census/admin/launch_access_codes_export.rb +1 -1
  60. data/app/commands/decidim/votings/census/admin/launch_access_codes_generation.rb +1 -1
  61. data/app/commands/decidim/votings/census/admin/update_dataset.rb +1 -1
  62. data/app/commands/decidim/votings/certify_polling_station_closure.rb +1 -1
  63. data/app/commands/decidim/votings/check_census.rb +1 -1
  64. data/app/commands/decidim/votings/create_polling_station_closure.rb +1 -1
  65. data/app/commands/decidim/votings/create_polling_station_results.rb +1 -1
  66. data/app/commands/decidim/votings/send_access_code.rb +1 -1
  67. data/app/commands/decidim/votings/sign_polling_station_closure.rb +1 -1
  68. data/app/commands/decidim/votings/voter/in_person_vote.rb +1 -1
  69. data/app/commands/decidim/votings/voter/update_in_person_vote_status.rb +1 -1
  70. data/app/controllers/decidim/elections/admin/questions_controller.rb +5 -0
  71. data/app/controllers/decidim/elections/admin/steps_controller.rb +2 -2
  72. data/app/controllers/decidim/elections/elections_controller.rb +10 -12
  73. data/app/controllers/decidim/elections/trustee_zone/elections_controller.rb +1 -1
  74. data/app/controllers/decidim/votings/census/admin/census_controller.rb +1 -1
  75. data/app/controllers/decidim/votings/votings_controller.rb +12 -13
  76. data/app/forms/decidim/elections/admin/question_form.rb +0 -2
  77. data/app/forms/decidim/elections/admin/setup_form.rb +4 -3
  78. data/app/forms/decidim/elections/admin/vote_period_form.rb +2 -2
  79. data/app/forms/decidim/votings/admin/ballot_style_form.rb +1 -1
  80. data/app/forms/decidim/votings/admin/voting_form.rb +4 -3
  81. data/app/forms/decidim/votings/census/admin/dataset_form.rb +2 -5
  82. data/app/forms/decidim/votings/census/admin/datum_form.rb +5 -1
  83. data/app/helpers/decidim/elections/application_helper.rb +1 -1
  84. data/app/helpers/decidim/elections/votes_helper.rb +3 -1
  85. data/app/helpers/decidim/votings/votings_helper.rb +1 -1
  86. data/app/mailers/decidim/elections/trustee_mailer.rb +28 -0
  87. data/app/models/decidim/elections/answer.rb +1 -6
  88. data/app/models/decidim/elections/election.rb +13 -2
  89. data/app/models/decidim/elections/question.rb +2 -7
  90. data/app/models/decidim/votings/polling_station.rb +2 -3
  91. data/app/models/decidim/votings/voting.rb +15 -0
  92. data/app/packs/entrypoints/{decidim_elections_trustee_tally.js → decidim_elections_trustee_tally_started.js} +0 -0
  93. data/app/packs/src/decidim/elections/trustee/tally.js +1 -1
  94. data/app/packs/src/decidim/elections/voter/setup-vote.js +7 -0
  95. data/app/packs/src/decidim/votings/voting-description-cell.js +1 -8
  96. data/app/permissions/decidim/votings/admin/permissions.rb +5 -15
  97. data/app/permissions/decidim/votings/permissions.rb +1 -3
  98. data/app/presenters/decidim/votings/admin_log/ballot_style_presenter.rb +5 -1
  99. data/app/presenters/decidim/votings/voting_stats_presenter.rb +4 -1
  100. data/app/queries/decidim/elections/admin/pending_actions.rb +1 -1
  101. data/app/queries/decidim/elections/admin/votes_for_statistics.rb +1 -1
  102. data/app/queries/decidim/elections/elections_finished_to_end.rb +1 -1
  103. data/app/queries/decidim/elections/elections_ready_to_start.rb +1 -1
  104. data/app/queries/decidim/elections/filtered_elections.rb +1 -1
  105. data/app/queries/decidim/elections/trustees/by_participatory_space.rb +1 -1
  106. data/app/queries/decidim/elections/trustees/by_participatory_space_trustee_ids.rb +1 -1
  107. data/app/queries/decidim/elections/votes/last_vote_for_voter.rb +1 -1
  108. data/app/queries/decidim/elections/votes/pending_votes.rb +1 -1
  109. data/app/queries/decidim/votings/admin/admin_users.rb +1 -1
  110. data/app/queries/decidim/votings/admin/ballot_style_by_voting_code.rb +1 -1
  111. data/app/queries/decidim/votings/admin/polling_officers_join_polling_stations.rb +1 -1
  112. data/app/queries/decidim/votings/admin/polling_officers_join_polling_stations_and_user.rb +2 -2
  113. data/app/queries/decidim/votings/admin/polling_officers_join_user.rb +1 -1
  114. data/app/queries/decidim/votings/organization_prioritized_votings.rb +2 -2
  115. data/app/queries/decidim/votings/organization_promoted_votings.rb +1 -1
  116. data/app/queries/decidim/votings/organization_published_votings.rb +2 -2
  117. data/app/queries/decidim/votings/organization_votings.rb +1 -1
  118. data/app/queries/decidim/votings/prioritized_votings.rb +1 -1
  119. data/app/queries/decidim/votings/published_votings.rb +1 -1
  120. data/app/queries/decidim/votings/votes/in_person_vote_for_voter.rb +1 -1
  121. data/app/queries/decidim/votings/votes/pending_in_person_votes.rb +1 -1
  122. data/app/services/decidim/votings/census_vote_flow.rb +1 -3
  123. data/app/views/decidim/elections/admin/questions/_form.html.erb +0 -4
  124. data/app/views/decidim/elections/admin/steps/{_tally.html.erb → _tally_started.html.erb} +1 -1
  125. data/app/views/decidim/elections/elections/_filters.html.erb +2 -2
  126. data/app/views/decidim/elections/elections/election_log.html.erb +3 -1
  127. data/app/views/decidim/elections/elections/show.html.erb +2 -2
  128. data/app/views/decidim/elections/trustee_mailer/notification.html.erb +5 -0
  129. data/app/views/decidim/elections/trustee_zone/elections/{_tally_steps.html.erb → _tally_started_steps.html.erb} +0 -0
  130. data/app/views/decidim/elections/trustee_zone/elections/show.html.erb +3 -1
  131. data/app/views/decidim/elections/trustee_zone/trustees/show.html.erb +3 -1
  132. data/app/views/decidim/elections/votes/_onboarding_modal.html.erb +3 -1
  133. data/app/views/decidim/elections/votes/_server_error_modal.html.erb +28 -0
  134. data/app/views/decidim/elections/votes/_show_casting.html.erb +3 -1
  135. data/app/views/decidim/elections/votes/new.html.erb +19 -11
  136. data/app/views/decidim/elections/votes/verify.html.erb +4 -1
  137. data/app/views/decidim/votings/admin/votings/_form.html.erb +15 -6
  138. data/app/views/decidim/votings/polling_officer_zone/closures/_certify_form.html.erb +3 -1
  139. data/app/views/decidim/votings/polling_officer_zone/closures/_sign_form.html.erb +3 -1
  140. data/app/views/decidim/votings/polling_officer_zone/closures/edit.html.erb +3 -1
  141. data/app/views/decidim/votings/polling_officer_zone/closures/new.html.erb +3 -1
  142. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/_complete_voting.html.erb +8 -2
  143. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/new.html.erb +3 -1
  144. data/app/views/decidim/votings/polling_officer_zone/in_person_votes/show.html.erb +3 -1
  145. data/app/views/decidim/votings/votings/_check_fields.html.erb +13 -15
  146. data/app/views/decidim/votings/votings/_filters.html.erb +2 -3
  147. data/app/views/decidim/votings/votings/check_census.html.erb +5 -1
  148. data/app/views/layouts/decidim/election_votes.html.erb +3 -1
  149. data/config/assets.rb +1 -1
  150. data/config/locales/am-ET.yml +1 -0
  151. data/config/locales/ar.yml +28 -0
  152. data/config/locales/bg.yml +1 -0
  153. data/config/locales/ca.yml +74 -38
  154. data/config/locales/cs.yml +79 -37
  155. data/config/locales/da.yml +1 -0
  156. data/config/locales/de.yml +7 -42
  157. data/config/locales/el.yml +1 -1
  158. data/config/locales/en.yml +73 -36
  159. data/config/locales/eo.yml +1 -0
  160. data/config/locales/es-MX.yml +77 -41
  161. data/config/locales/es-PY.yml +77 -41
  162. data/config/locales/es.yml +79 -43
  163. data/config/locales/et.yml +1 -0
  164. data/config/locales/eu.yml +6 -48
  165. data/config/locales/fi-plain.yml +73 -37
  166. data/config/locales/fi.yml +75 -39
  167. data/config/locales/fr-CA.yml +62 -36
  168. data/config/locales/fr.yml +65 -39
  169. data/config/locales/ga-IE.yml +1 -15
  170. data/config/locales/gl.yml +24 -32
  171. data/config/locales/hr.yml +1 -0
  172. data/config/locales/hu.yml +103 -6
  173. data/config/locales/id-ID.yml +1 -0
  174. data/config/locales/is-IS.yml +2 -1
  175. data/config/locales/it.yml +7 -40
  176. data/config/locales/ja.yml +66 -40
  177. data/config/locales/ko.yml +1 -0
  178. data/config/locales/lb.yml +1 -0
  179. data/config/locales/lt.yml +1 -0
  180. data/config/locales/lv.yml +1 -1
  181. data/config/locales/mt.yml +1 -0
  182. data/config/locales/nl.yml +11 -48
  183. data/config/locales/no.yml +15 -40
  184. data/config/locales/om-ET.yml +1 -0
  185. data/config/locales/pl.yml +17 -43
  186. data/config/locales/pt-BR.yml +8 -43
  187. data/config/locales/pt.yml +13 -48
  188. data/config/locales/ro-RO.yml +11 -38
  189. data/config/locales/ru.yml +1 -0
  190. data/config/locales/si-LK.yml +1 -0
  191. data/config/locales/sk.yml +1 -0
  192. data/config/locales/sl.yml +1 -0
  193. data/config/locales/so-SO.yml +1 -0
  194. data/config/locales/sr-CS.yml +1 -0
  195. data/config/locales/sv.yml +61 -18
  196. data/config/locales/sw-KE.yml +1 -0
  197. data/config/locales/ti-ER.yml +1 -0
  198. data/config/locales/tr-TR.yml +4 -9
  199. data/config/locales/uk.yml +1 -0
  200. data/config/locales/val-ES.yml +1 -0
  201. data/config/locales/vi.yml +1 -0
  202. data/config/locales/zh-CN.yml +1 -1
  203. data/config/locales/zh-TW.yml +1 -0
  204. data/db/migrate/20220404112802_rename_bb_status_tally_to_tally_started.rb +19 -0
  205. data/db/migrate/20220424121541_add_show_check_census_to_votings.rb +7 -0
  206. data/db/migrate/20220615102642_remove_description_from_elections_questions.rb +7 -0
  207. data/lib/decidim/api/election_question_type.rb +0 -1
  208. data/lib/decidim/elections/admin_engine.rb +4 -1
  209. data/lib/decidim/elections/component.rb +4 -16
  210. data/lib/decidim/elections/test/factories.rb +4 -5
  211. data/lib/decidim/elections/version.rb +1 -1
  212. data/lib/decidim/votings/participatory_space.rb +3 -3
  213. data/lib/decidim/votings/test/factories.rb +2 -1
  214. metadata +31 -27
  215. data/app/services/decidim/elections/election_search.rb +0 -35
  216. data/app/services/decidim/votings/voting_search.rb +0 -46
@@ -97,9 +97,7 @@ module Decidim
97
97
  end
98
98
 
99
99
  def valid_token_flow_data?
100
- @valid_token_flow_data ||= begin
101
- has_voter? && received_voter_token_data[:flow].as_json == voter_data.as_json
102
- end
100
+ @valid_token_flow_data ||= has_voter? && received_voter_token_data[:flow].as_json == voter_data.as_json
103
101
  end
104
102
  end
105
103
  end
@@ -8,10 +8,6 @@
8
8
  <%= form.translated :text_field, :title, autofocus: true %>
9
9
  </div>
10
10
 
11
- <div class="row column">
12
- <%= form.translated :editor, :description %>
13
- </div>
14
-
15
11
  <div class="row column">
16
12
  <%= form.number_field :max_selections, step: 1, min: 0 %>
17
13
  </div>
@@ -61,7 +61,7 @@
61
61
  </div>
62
62
 
63
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" %>
64
+ <%= link_to t("steps.tally_started.continue", scope: "decidim.elections.admin"), election_steps_path(election), class: "button disabled js-continue-link" %>
65
65
  </div>
66
66
 
67
67
  <%= javascript_pack_tag "decidim_elections_admin_trustees_process" %>
@@ -4,7 +4,7 @@
4
4
  <div class="filters__section">
5
5
  <div class="filters__search">
6
6
  <div class="input-group">
7
- <%= form.search_field :search_text,
7
+ <%= form.search_field :search_text_cont,
8
8
  label: false,
9
9
  class: "input-group-field",
10
10
  placeholder: t(".search"),
@@ -20,6 +20,6 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <%= form.check_boxes_tree :state, state_filter_values, legend_title: t(".state") %>
23
+ <%= form.check_boxes_tree :with_any_date, date_filter_values, legend_title: t(".date") %>
24
24
  <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
25
25
  <% end %>
@@ -179,4 +179,6 @@
179
179
  </div>
180
180
  </div>
181
181
 
182
- <%= javascript_pack_tag "decidim_elections_election_log" %>
182
+ <% content_for :js_content do %>
183
+ <%= javascript_pack_tag "decidim_elections_election_log" %>
184
+ <% end %>
@@ -24,9 +24,9 @@ edit_link(
24
24
  <% end %>
25
25
  <% end %>
26
26
 
27
- <h1 class="heading3">
27
+ <h2 class="heading3">
28
28
  <%== present(election).title %>
29
- </h1>
29
+ </h2>
30
30
  <div class="card__callout">
31
31
  <%= cell "decidim/elections/remaining_time_callout", election %>
32
32
  </div>
@@ -0,0 +1,5 @@
1
+ <%== t("body", scope: "decidim.elections.admin.mailers.trustee_mailer", resource_name: @participatory_space_title, user_name: @user.name) %>
2
+
3
+ <p class="email-button email-button__cta">
4
+ <%= link_to t("trustee_zone", scope: "decidim.elections.admin.mailers.trustee_mailer"), decidim.decidim_elections_trustee_zone_url(host: @organization.host) %>
5
+ </p>
@@ -18,5 +18,7 @@
18
18
  <%= render("#{current_step}_steps") %>
19
19
  </div>
20
20
 
21
- <%= javascript_pack_tag "decidim_elections_trustee_#{current_step}" %>
21
+ <% content_for :js_content do %>
22
+ <%= javascript_pack_tag "decidim_elections_trustee_#{current_step}" %>
23
+ <% end %>
22
24
  <% end %>
@@ -99,4 +99,6 @@
99
99
  <% end %>
100
100
  </div>
101
101
 
102
- <%= javascript_pack_tag "decidim_elections_trustee_trustee_zone" %>
102
+ <% content_for :js_content do %>
103
+ <%= javascript_pack_tag "decidim_elections_trustee_trustee_zone" %>
104
+ <% end %>
@@ -20,4 +20,6 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <%= javascript_pack_tag "decidim_elections_onboarding" %>
23
+ <% content_for :js_content do %>
24
+ <%= javascript_pack_tag "decidim_elections_onboarding" %>
25
+ <% end %>
@@ -0,0 +1,28 @@
1
+ <div class="reveal" id="server-failure" data-reveal>
2
+ <div class="reveal__header">
3
+ <h3 class="reveal__title">
4
+ <%= t("modal.title", scope: "decidim.elections.votes.failed") %>
5
+ </h3>
6
+
7
+ <button class="close-button" data-close aria-label="<%= t("modal.close", scope: "decidim.elections.votes.failed") %>"
8
+ type="button">
9
+ <span aria-hidden="true">&times;</span>
10
+ </button>
11
+ </div>
12
+
13
+ <div class="row">
14
+ <p>
15
+ <%= t("modal.communication_lost", scope: "decidim.elections.votes.failed").html_safe %>
16
+ </p>
17
+
18
+ <p class="help-text tech-info"></p>
19
+ </div>
20
+
21
+ <div class="row">
22
+ <div class="column flex-center">
23
+ <button class="button primary expanded" data-close type="button">
24
+ <%= t("modal.close", scope: "decidim.elections.votes.failed") %>
25
+ </button>
26
+ </div>
27
+ </div>
28
+ </div>
@@ -22,4 +22,6 @@
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" %>
25
+ <% content_for :js_content do %>
26
+ <%= javascript_pack_tag "decidim_elections_voter_casting_vote" %>
27
+ <% end %>
@@ -1,11 +1,13 @@
1
1
  <div class="vote-wrapper"
2
- data-election-id="<%= election.id %>"
3
- data-api-endpoint-url="<%= bulletin_board_server %>"
2
+ data-election-id="<%== election.id %>"
3
+ data-api-endpoint-url="<%== bulletin_board_server %>"
4
4
  data-authority-public-key="<%= authority_public_key %>"
5
- data-election-unique-id="<%= election_unique_id %>"
6
- data-voter-id="<%= voter_id %>"
7
- <%= ballot_style_id.present? ? "data-ballot-style-id=\"#{ballot_style_id}\"" : nil %>
8
- data-scheme-name="<%= scheme_name %>">
5
+ data-election-unique-id="<%== election_unique_id %>"
6
+ data-voter-id="<%== voter_id %>"
7
+ data-scheme-name="<%== scheme_name %>"
8
+ <% if ballot_style_id.present? %>
9
+ data-ballot-style-id="<%== ballot_style_id %>"
10
+ <% end %>>
9
11
 
10
12
  <% questions.each_with_index do |step_question, step_index| %>
11
13
  <div id="step-<%= step_index %>" class="focus__step <%= "hide" if step_index.positive? %>"
@@ -57,9 +59,15 @@
57
59
  </div>
58
60
  </div>
59
61
 
60
- <% if preview_mode? %>
61
- <%= javascript_pack_tag "decidim_elections_voter_setup_preview" %>
62
- <% else %>
63
- <%= javascript_pack_tag "decidim_elections_voter_setup_vote" %>
62
+ <%= render "server_error_modal" %>
63
+
64
+ <% content_for :js_content do %>
65
+
66
+ <% if preview_mode? %>
67
+ <%= javascript_pack_tag "decidim_elections_voter_setup_preview" %>
68
+ <% else %>
69
+ <%= javascript_pack_tag "decidim_elections_voter_setup_vote" %>
70
+ <% end %>
71
+
72
+ <%= javascript_pack_tag "decidim_elections_voter_new_vote" %>
64
73
  <% end %>
65
- <%= javascript_pack_tag "decidim_elections_voter_new_vote" %>
@@ -54,6 +54,7 @@
54
54
 
55
55
  <input type="text" class="vote-identifier" name="vote-identifier" value="<%= params[:vote_id].gsub("_","") %>">
56
56
  </label>
57
+ <p class="help-text"><%= t("decidim.elections.votes.verify.form.vote_identifier_help") %></p>
57
58
  <div>
58
59
  <%= link_to(
59
60
  "#",
@@ -72,4 +73,6 @@
72
73
 
73
74
  </div>
74
75
 
75
- <%= javascript_pack_tag "decidim_elections_voter_verify_vote" %>
76
+ <% content_for :js_content do %>
77
+ <%= javascript_pack_tag "decidim_elections_voter_verify_vote" %>
78
+ <% end %>
@@ -27,7 +27,7 @@
27
27
  <div class="row column">
28
28
  <%= form.select :voting_type,
29
29
  @form.options_for_voting_type_select,
30
- { include_blank: t(".select_a_voting_type") },
30
+ { include_blank: t(".select_a_voting_type"), label: t(".voting_type_label") },
31
31
  { multiple: false } %>
32
32
  </div>
33
33
 
@@ -37,16 +37,25 @@
37
37
 
38
38
  <div class="row">
39
39
  <div class="columns xlarge-6 slug">
40
- <%= form.text_field :slug %>
40
+ <%= form.text_field :slug, label: t(".slug") %>
41
41
  <p class="help-text">
42
42
  <%== t(".slug_help", url: decidim_form_slug_url(:votings, form.object.slug)) %>
43
43
  </p>
44
44
  </div>
45
45
  </div>
46
46
 
47
+ <div class="row">
48
+ <div class="columns xlarge-6 show_check_census">
49
+ <%= form.check_box :show_check_census %>
50
+ <p class="help-text">
51
+ <%== t(".show_check_census_help") %>
52
+ </p>
53
+ </div>
54
+ </div>
55
+
47
56
  <div class="row">
48
57
  <div class="columns xlarge-6 census_contact_information">
49
- <%= form.text_field :census_contact_information %>
58
+ <%= form.text_field :census_contact_information, label: t(".census_contact_information") %>
50
59
  <p class="help-text">
51
60
  <%== t(".census_contact_information_help") %>
52
61
  </p>
@@ -54,16 +63,16 @@
54
63
  </div>
55
64
 
56
65
  <div class="row column">
57
- <%= form.check_box :promoted %>
66
+ <%= form.check_box :promoted, label: t(".promoted") %>
58
67
  </div>
59
68
 
60
69
  <div class="row">
61
70
  <div class="columns xlarge-4">
62
- <%= form.upload :banner_image %>
71
+ <%= form.upload :banner_image, label: t(".banner_image") %>
63
72
  </div>
64
73
 
65
74
  <div class="columns xlarge-4">
66
- <%= form.upload :introductory_image %>
75
+ <%= form.upload :introductory_image, label: t(".introductory_image") %>
67
76
  </div>
68
77
  </div>
69
78
  </div>
@@ -6,7 +6,9 @@
6
6
  <fieldset>
7
7
  <legend><%= t("form_legend", scope: "decidim.votings.polling_officer_zone.closures.certify") %></legend>
8
8
  <div class="row column">
9
- <%= form.file_field :add_photos, multiple: true, label: t("add_images", scope: "decidim.votings.polling_officer_zone.closures.certify") %>
9
+ <%= form.attachment :photos,
10
+ multiple: true,
11
+ label: t("add_images", scope: "decidim.votings.polling_officer_zone.closures.certify") %>
10
12
  </div>
11
13
  </fieldset>
12
14
  </div>
@@ -53,4 +53,6 @@
53
53
  </div>
54
54
  <% end %>
55
55
 
56
- <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_sign_closure" %>
56
+ <% content_for :js_content do %>
57
+ <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_sign_closure" %>
58
+ <% end %>
@@ -45,4 +45,6 @@
45
45
 
46
46
  <%= render "modal_ballots_results_count_error" %>
47
47
 
48
- <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_edit_closure" %>
48
+ <% content_for :js_content do %>
49
+ <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_edit_closure" %>
50
+ <% end %>
@@ -59,4 +59,6 @@
59
59
  </div>
60
60
  </div>
61
61
 
62
- <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_new_closure" %>
62
+ <% content_for :js_content do %>
63
+ <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_new_closure" %>
64
+ <% end %>
@@ -2,7 +2,11 @@
2
2
  <div class="columns">
3
3
  <% if vote_check.allowed? %>
4
4
  <div class="callout success mt-s">
5
- <h5><%= t(".census_verified") %></h5>
5
+ <% if voted_online? %>
6
+ <h5><%= t(".census_verified_with_online_vote") %></h5>
7
+ <% else %>
8
+ <h5><%= t(".census_verified") %></h5>
9
+ <% end %>
6
10
  </div>
7
11
  <div class="row mt-sm">
8
12
  <div class="columns large-7">
@@ -56,4 +60,6 @@
56
60
  </div>
57
61
  </div>
58
62
 
59
- <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_in_person_vote" %>
63
+ <% content_for :js_content do %>
64
+ <%= javascript_pack_tag "decidim_votings_voting_polling_officer_zone_in_person_vote" %>
65
+ <% end %>
@@ -18,4 +18,6 @@
18
18
  <% end %>
19
19
  </div>
20
20
 
21
- <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
21
+ <% content_for :js_content do %>
22
+ <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
23
+ <% end %>
@@ -22,4 +22,6 @@
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" %>
25
+ <% content_for :js_content do %>
26
+ <%= javascript_pack_tag "decidim_votings_in_person_vote" %>
27
+ <% end %>
@@ -1,10 +1,8 @@
1
1
  <div>
2
- <%= f.label :document_type do %>
3
- <%= f.select :document_type,
4
- form.options_for_document_type_select,
5
- { include_blank: t(".select") },
6
- { multiple: false } %>
7
- <% end %>
2
+ <%= f.select :document_type,
3
+ form.options_for_document_type_select,
4
+ { include_blank: t(".select"), label: t(".document_type") },
5
+ { multiple: false } %>
8
6
  </div>
9
7
  <div>
10
8
  <%= f.text_field :document_number, label: t(".document_number"), placeholder: t(".document_number_placeholder") %>
@@ -15,17 +13,17 @@
15
13
  <fieldset>
16
14
  <legend><%= t(".date_of_birth") %></legend>
17
15
  <div class="row">
18
- <%= f.label :day, t(".day"), class: "columns small-4" do %>
19
- <%= f.text_field :day, placeholder: t(".day_placeholder"), "data-autojump" => true, "data-max-length" => 2,
16
+ <div class="columns small-4">
17
+ <%= f.text_field :day, placeholder: t(".day_placeholder"), label: t(".day"), "data-autojump" => true, "data-max-length" => 2,
20
18
  "data-jump-next" => "#login_month" %>
21
- <% end %>
22
- <%= f.label :month, t(".month"), class: "columns small-4" do %>
23
- <%= f.text_field :month, placeholder: t(".month_placeholder"), "data-autojump" => true, "data-max-length" => 2,
19
+ </div>
20
+ <div class="columns small-4">
21
+ <%= f.text_field :month, placeholder: t(".month_placeholder"), label: t(".month"), "data-autojump" => true, "data-max-length" => 2,
24
22
  "data-jump-prev" => "#login_day", "data-jump-next" => "#login_year" %>
25
- <% end %>
26
- <%= f.label :year, t(".year"), class: "columns small-4" do %>
27
- <%= f.text_field :year, placeholder: t(".year_placeholder"), "data-autojump" => true, "data-max-length" => 4,
23
+ </div>
24
+ <div class="columns small-4">
25
+ <%= f.text_field :year, placeholder: t(".year_placeholder"), label: t(".year"), "data-autojump" => true, "data-max-length" => 4,
28
26
  "data-jump-prev" => "#login_month" %>
29
- <% end %>
27
+ </div>
30
28
  </div>
31
29
  </fieldset>
@@ -4,7 +4,7 @@
4
4
  <div class="filters__section">
5
5
  <div class="filters__search">
6
6
  <div class="input-group">
7
- <%= form.search_field :search_text,
7
+ <%= form.search_field :search_text_cont,
8
8
  label: false,
9
9
  class: "input-group-field",
10
10
  placeholder: t(".search"),
@@ -20,7 +20,6 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <%= form.check_boxes_tree :state, filter_states_values, legend_title: t(".state") %>
24
-
23
+ <%= form.check_boxes_tree :with_any_date, date_filter_values, legend_title: t(".date") %>
25
24
  <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
26
25
  <% end %>
@@ -22,12 +22,16 @@ edit_link(
22
22
  <p>
23
23
  <%= t("decidim.votings.votings.check_census.success.info") %>
24
24
  <button type="button" class="link" data-open="access-code-modal">
25
+ <% if Decidim.sms_gateway_service.to_s.safe_constantize %>
26
+ <%= t("decidim.votings.votings.check_census.success.access_link_with_sms") %>
27
+ <% else %>
25
28
  <%= t("decidim.votings.votings.check_census.success.access_link") %>
29
+ <% end %>
26
30
  </button>
27
31
  </p>
28
32
  </div>
29
33
  <% if datum.email.present? || datum.mobile_phone_number.present? %>
30
- <%= render partial: "access_code_modal", locals: { datum: datum, email: datum.email ? datum.email.gsub!(/.{4}(?=@)/,"****") : "", sms: datum.mobile_phone_number ? datum.mobile_phone_number.gsub!(/.{3}\d$/,"***") : "" } %>
34
+ <%= render partial: "access_code_modal", locals: { datum: datum, email: datum.email ? datum.email.gsub!(/^.+@/,"****@") : "", sms: datum.mobile_phone_number ? datum.mobile_phone_number.gsub!(/.{3}\d$/,"***") : "" } %>
31
35
  <% end %>
32
36
  <% elsif not_found %>
33
37
  <div class="verify-census-error callout alert mt-s">
@@ -18,8 +18,10 @@
18
18
  <body>
19
19
  <main class="focus">
20
20
  <%= render partial: "layouts/decidim/election_votes_header" %>
21
+
21
22
  <%= yield %>
22
- <%= render partial: "layouts/decidim/js_configuration" %>
23
23
  </main>
24
+
25
+ <%= render partial: "layouts/decidim/decidim_javascript" %>
24
26
  </body>
25
27
  </html>
data/config/assets.rb CHANGED
@@ -11,7 +11,7 @@ Decidim::Webpacker.register_entrypoints(
11
11
  decidim_elections_admin_trustees_process: "#{base_path}/app/packs/entrypoints/decidim_elections_admin_trustees_process.js",
12
12
  decidim_elections_admin_vote_statistics: "#{base_path}/app/packs/entrypoints/decidim_elections_admin_vote_statistics.js",
13
13
  decidim_elections_trustee_key_ceremony: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_key_ceremony.js",
14
- decidim_elections_trustee_tally: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_tally.js",
14
+ decidim_elections_trustee_tally_started: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_tally_started.js",
15
15
  decidim_elections_trustee_zone: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_zone.js",
16
16
  decidim_elections_trustee_trustee_zone: "#{base_path}/app/packs/entrypoints/decidim_elections_trustee_trustee_zone.js",
17
17
  decidim_elections_voter_casting_vote: "#{base_path}/app/packs/entrypoints/decidim_elections_voter_casting-vote.js",
@@ -1 +1,2 @@
1
+ ---
1
2
  am:
@@ -1,13 +1,41 @@
1
+ ---
1
2
  ar:
3
+ activemodel:
4
+ attributes:
5
+ answer:
6
+ description: الوصف
7
+ election:
8
+ description: الوصف
2
9
  decidim:
3
10
  elections:
11
+ admin:
12
+ steps:
13
+ tally_started:
14
+ invalid: كانت هناك مشكلة في الإبلاغ عن الأمين المفقود
15
+ mark_as_missing: وضع علامة مفقود
16
+ mark_as_missing_description: يجب أن يشارك جميع الأمناء في هذه العملية، ولكن إذا لم يتمكن الأمين من المشاركة في العملية، يمكنك وضع علامة على أنها مفقودة.
17
+ success: وقد تم بنجاح إرسال تقرير الأمين المفقود إلى لوحة الإعلانات
18
+ tally_completion: وستكتمل هذه العملية عندما يكون جميع الأمناء مُفعلين أو موسومين باعتبارهم مفقودين. مطلوب بحد أدنى %{quorum} من الأمناء لإكمال العملية.
19
+ undo_mark_as_missing: وسيتمكن الأمين الذي وُضع عليه علامة مفقودة عن طريق الخطأ من المشاركة قبل إتمام العملية. ويمكنهم المضي قدما كالمعتاد وسيتم تجاهل العلامة المفقودة.
20
+ elections:
21
+ election_log:
22
+ results_title: النتائج
23
+ results:
24
+ percentage: "%{count}%"
4
25
  trustee_zone:
5
26
  trustees:
6
27
  show:
7
28
  identification_keys:
8
29
  cancel: إلغاء
9
30
  votings:
31
+ admin:
32
+ monitoring_committee_election_results:
33
+ actions:
34
+ title: الإجراءات
10
35
  polling_officer_zone:
11
36
  closures:
37
+ edit:
38
+ modal_ballots_results_count_error:
39
+ close_modal: غلق
12
40
  sign:
13
41
  cancel: إلغاء
@@ -1,3 +1,4 @@
1
+ ---
1
2
  bg:
2
3
  activemodel:
3
4
  attributes: