decidim-elections 0.26.0.rc2 → 0.26.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/elections/election_preview/show.erb +1 -1
- data/app/cells/decidim/elections/election_results/show.erb +1 -1
- data/app/cells/decidim/elections/election_vote_cta_cell.rb +8 -3
- data/app/cells/decidim/votings/content_blocks/landing_page/description/show.erb +2 -12
- data/app/cells/decidim/votings/content_blocks/landing_page/description_cell.rb +0 -8
- data/app/cells/decidim/votings/content_blocks/landing_page/header/show.erb +2 -2
- data/app/cells/decidim/votings/content_blocks/landing_page/polling_stations/address.erb +1 -1
- data/app/commands/decidim/elections/admin/add_user_as_trustee.rb +21 -11
- data/app/commands/decidim/elections/admin/create_question.rb +2 -5
- data/app/commands/decidim/votings/admin/destroy_ballot_style.rb +1 -1
- data/app/controllers/decidim/elections/admin/questions_controller.rb +5 -0
- data/app/controllers/decidim/votings/census/admin/census_controller.rb +1 -1
- data/app/controllers/decidim/votings/votings_controller.rb +2 -0
- data/app/forms/decidim/votings/census/admin/datum_form.rb +4 -0
- data/app/helpers/decidim/elections/votes_helper.rb +3 -1
- data/app/mailers/decidim/elections/trustee_mailer.rb +28 -0
- data/app/packs/src/decidim/votings/voting-description-cell.js +1 -8
- data/app/permissions/decidim/votings/admin/permissions.rb +3 -1
- data/app/presenters/decidim/votings/admin_log/ballot_style_presenter.rb +5 -1
- data/app/views/decidim/elections/elections/show.html.erb +2 -2
- data/app/views/decidim/elections/trustee_mailer/notification.html.erb +5 -0
- data/app/views/decidim/elections/votes/new.html.erb +8 -6
- data/app/views/decidim/votings/admin/votings/_form.html.erb +6 -6
- data/app/views/decidim/votings/votings/_check_fields.html.erb +13 -15
- data/app/views/decidim/votings/votings/check_census.html.erb +5 -1
- data/config/locales/ar.yml +29 -0
- data/config/locales/ca.yml +27 -11
- data/config/locales/cs.yml +31 -13
- data/config/locales/de.yml +6 -16
- data/config/locales/en.yml +28 -12
- data/config/locales/es-MX.yml +36 -20
- data/config/locales/es-PY.yml +31 -15
- data/config/locales/es.yml +31 -15
- data/config/locales/eu.yml +1 -14
- data/config/locales/fi-plain.yml +29 -13
- data/config/locales/fi.yml +29 -13
- data/config/locales/fr-CA.yml +29 -13
- data/config/locales/fr.yml +30 -14
- data/config/locales/gl.yml +9 -14
- data/config/locales/hu.yml +197 -0
- data/config/locales/it.yml +6 -16
- data/config/locales/ja.yml +32 -17
- data/config/locales/nl.yml +15 -15
- data/config/locales/no.yml +501 -1
- data/config/locales/pl.yml +2 -15
- data/config/locales/pt-BR.yml +2 -15
- data/config/locales/pt.yml +2 -15
- data/config/locales/ro-RO.yml +19 -14
- data/config/locales/sv.yml +107 -9
- data/config/locales/tr-TR.yml +9 -0
- data/config/locales/zh-CN.yml +4 -1
- data/lib/decidim/elections/admin_engine.rb +4 -1
- data/lib/decidim/elections/version.rb +1 -1
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8219848da3b47bb1de74d7c35c5d9f2f1b98ee394a1d9e07201cfc3760e8650
|
4
|
+
data.tar.gz: 8c2a725b532393fc5ddbdcbc2db2e320ce288e3b067e22524277097409f1ffa5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 668655440f14e989272e753a90332751b8d10ed8b8b63a7b0cbd14ef1fde3f4e79edaf9d6f499f00318ba1862ef1be157a7407806d30ed60dd2d274299f70968
|
7
|
+
data.tar.gz: 82341a653e8ee97716326601b815ce8d6f90811b94b92e057f1ae4983614d835253e5b3d6d59671c7ccd76d8d18db28bb3505aac69b750bedbba96bb688442e0
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<div class="columns large-8">
|
3
|
-
<
|
3
|
+
<h3 class="section-heading"><%= t("decidim.elections.elections.preview.title") %></h3>
|
4
4
|
|
5
5
|
<p><%= t("decidim.elections.elections.preview.description") %></p>
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="row">
|
2
2
|
<div class="columns large-8">
|
3
|
-
<
|
3
|
+
<h3 class="section-heading"><%= t("decidim.elections.elections.results.title") %></h3>
|
4
4
|
|
5
5
|
<p><%= t("decidim.elections.elections.results.description") %></p>
|
6
6
|
|
@@ -5,15 +5,20 @@ module Decidim
|
|
5
5
|
# This cell renders the results
|
6
6
|
# for a given instance of an Election
|
7
7
|
class ElectionVoteCtaCell < Decidim::ViewModel
|
8
|
+
include Decidim::Elections::HasVoteFlow
|
9
|
+
|
8
10
|
delegate :current_user,
|
9
11
|
:current_participatory_space,
|
10
|
-
:
|
11
|
-
:can_preview?,
|
12
|
-
:vote_flow,
|
12
|
+
:allowed_to?,
|
13
13
|
to: :controller
|
14
14
|
|
15
15
|
private
|
16
16
|
|
17
|
+
# This is needed by HasVoteFlow
|
18
|
+
def election
|
19
|
+
model
|
20
|
+
end
|
21
|
+
|
17
22
|
def last_vote
|
18
23
|
@last_vote ||= Decidim::Elections::Votes::LastVoteForVoter.for(model, vote_flow.voter_id) if vote_flow.has_voter?
|
19
24
|
end
|
@@ -5,20 +5,10 @@
|
|
5
5
|
<img src="<%= introductory_image.path %>" alt="">
|
6
6
|
</div>
|
7
7
|
<% end %>
|
8
|
-
<div class="columns medium-8 mediumlarge-7
|
8
|
+
<div class="columns medium-8 mediumlarge-7">
|
9
|
+
<h2 class="show-for-sr"><%= t("decidim.votings.content_blocks.landing_page.description.title") %></h2>
|
9
10
|
<div><%= description_text %></div>
|
10
11
|
</div>
|
11
|
-
<div class="content-height-toggler show-more">
|
12
|
-
<button class="button button--muted tiny">
|
13
|
-
<span class="button-text show-more-content">
|
14
|
-
<%= button_show_more_text %>
|
15
|
-
</span>
|
16
|
-
|
17
|
-
<span class="button-text show-less-content hide">
|
18
|
-
<%= button_show_less_text %>
|
19
|
-
</span>
|
20
|
-
</button>
|
21
|
-
</div>
|
22
12
|
</div>
|
23
13
|
</div>
|
24
14
|
|
@@ -18,14 +18,6 @@ module Decidim
|
|
18
18
|
def description_text
|
19
19
|
decidim_sanitize_editor(translated_attribute(current_participatory_space.description))
|
20
20
|
end
|
21
|
-
|
22
|
-
def button_show_more_text
|
23
|
-
t(:show_more, scope: "decidim.votings.content_blocks.landing_page.description")
|
24
|
-
end
|
25
|
-
|
26
|
-
def button_show_less_text
|
27
|
-
t(:show_less, scope: "decidim.votings.content_blocks.landing_page.description")
|
28
|
-
end
|
29
21
|
end
|
30
22
|
end
|
31
23
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="polling_station-address">
|
2
|
-
<
|
2
|
+
<h4 class="mb-none heading5"><%= translated_attribute polling_station.title %></h4>
|
3
3
|
|
4
4
|
<div>
|
5
5
|
<strong><%= translated_attribute polling_station.location %></strong>
|
@@ -11,6 +11,8 @@ module Decidim
|
|
11
11
|
# form - A form object with the params.
|
12
12
|
def initialize(form, current_user)
|
13
13
|
@form = form
|
14
|
+
@user = form.user
|
15
|
+
@participatory_space = form.current_participatory_space
|
14
16
|
@current_user = current_user
|
15
17
|
end
|
16
18
|
|
@@ -27,29 +29,31 @@ module Decidim
|
|
27
29
|
notify_user_about_trustee_role if new_trustee?
|
28
30
|
end
|
29
31
|
|
32
|
+
send_email
|
33
|
+
|
30
34
|
broadcast(:ok)
|
31
35
|
end
|
32
36
|
|
33
37
|
private
|
34
38
|
|
35
|
-
attr_reader :form, :current_user, :trustee
|
39
|
+
attr_reader :form, :current_user, :trustee, :participatory_space, :user
|
36
40
|
|
37
41
|
def add_user_as_trustee!
|
38
42
|
@trustee = Decidim.traceability.create!(
|
39
43
|
Trustee,
|
40
|
-
|
41
|
-
user:
|
42
|
-
organization:
|
44
|
+
current_user,
|
45
|
+
user: user,
|
46
|
+
organization: user.organization
|
43
47
|
)
|
44
48
|
end
|
45
49
|
|
46
50
|
# If a trustee exists for this participatory space, it won't get created again
|
47
51
|
def existing_trustee_participatory_spaces?
|
48
|
-
trustees_space = TrusteesParticipatorySpace.where(participatory_space:
|
52
|
+
trustees_space = TrusteesParticipatorySpace.where(participatory_space: participatory_space).includes(:trustee)
|
49
53
|
@existing_trustee_participatory_spaces ||= Decidim::Elections::Trustee.joins(:trustees_participatory_spaces)
|
50
54
|
.includes([:user])
|
51
55
|
.where(trustees_participatory_spaces: trustees_space)
|
52
|
-
.where(decidim_user_id:
|
56
|
+
.where(decidim_user_id: user.id).any?
|
53
57
|
end
|
54
58
|
|
55
59
|
# if there's no user - trustee relation, the trustee gets created and the notification
|
@@ -57,13 +61,13 @@ module Decidim
|
|
57
61
|
def new_trustee?
|
58
62
|
return @new_trustee if defined?(@new_trustee)
|
59
63
|
|
60
|
-
@new_trustee = Decidim::Elections::Trustee.where(decidim_user_id:
|
64
|
+
@new_trustee = Decidim::Elections::Trustee.where(decidim_user_id: user.id).empty?
|
61
65
|
end
|
62
66
|
|
63
67
|
def add_participatory_space
|
64
|
-
trustee = Decidim::Elections::Trustee.find_by(decidim_user_id:
|
68
|
+
trustee = Decidim::Elections::Trustee.find_by(decidim_user_id: user.id)
|
65
69
|
trustee.trustees_participatory_spaces.create!(
|
66
|
-
participatory_space:
|
70
|
+
participatory_space: participatory_space
|
67
71
|
)
|
68
72
|
end
|
69
73
|
|
@@ -71,11 +75,17 @@ module Decidim
|
|
71
75
|
data = {
|
72
76
|
event: "decidim.events.elections.trustees.new_trustee",
|
73
77
|
event_class: Decidim::Elections::Trustees::NotifyNewTrusteeEvent,
|
74
|
-
resource:
|
75
|
-
affected_users: [
|
78
|
+
resource: participatory_space,
|
79
|
+
affected_users: [user]
|
76
80
|
}
|
77
81
|
Decidim::EventsManager.publish(**data)
|
78
82
|
end
|
83
|
+
|
84
|
+
def send_email
|
85
|
+
Decidim::Elections::TrusteeMailer.notification(
|
86
|
+
user, participatory_space, I18n.locale.to_s
|
87
|
+
).deliver_later
|
88
|
+
end
|
79
89
|
end
|
80
90
|
end
|
81
91
|
end
|
@@ -14,7 +14,8 @@ module Decidim
|
|
14
14
|
#
|
15
15
|
# Broadcasts :ok if successful, :invalid otherwise.
|
16
16
|
def call
|
17
|
-
return broadcast(:
|
17
|
+
return broadcast(:election_started) if form.election.started?
|
18
|
+
return broadcast(:invalid) if form.invalid?
|
18
19
|
|
19
20
|
create_question!
|
20
21
|
|
@@ -25,10 +26,6 @@ module Decidim
|
|
25
26
|
|
26
27
|
attr_reader :form, :question
|
27
28
|
|
28
|
-
def invalid?
|
29
|
-
form.election.started? || form.invalid?
|
30
|
-
end
|
31
|
-
|
32
29
|
def create_question!
|
33
30
|
attributes = {
|
34
31
|
election: form.election,
|
@@ -26,6 +26,11 @@ module Decidim
|
|
26
26
|
flash.now[:alert] = I18n.t("questions.create.invalid", scope: "decidim.elections.admin")
|
27
27
|
render action: "new"
|
28
28
|
end
|
29
|
+
|
30
|
+
on(:election_started) do
|
31
|
+
flash.now[:alert] = I18n.t("questions.create.election_started", scope: "decidim.elections.admin")
|
32
|
+
render action: "new"
|
33
|
+
end
|
29
34
|
end
|
30
35
|
end
|
31
36
|
|
@@ -98,7 +98,7 @@ module Decidim
|
|
98
98
|
if current_census.access_codes_file.attached?
|
99
99
|
redirect_to Rails.application.routes.url_helpers.rails_blob_url(current_census.access_codes_file.blob, only_path: true)
|
100
100
|
else
|
101
|
-
flash[:error] = t("export_access_codes.
|
101
|
+
flash[:error] = t("export_access_codes.file_not_exist", scope: "decidim.votings.census.admin.census")
|
102
102
|
redirect_to admin_voting_census_path
|
103
103
|
end
|
104
104
|
end
|
@@ -103,6 +103,8 @@ module Decidim
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def elections
|
106
|
+
raise ActionController::RoutingError, "Not Found" unless current_participatory_space
|
107
|
+
|
106
108
|
Decidim::Elections::Election.where(component: current_participatory_space.components).where.not(bb_status: nil)
|
107
109
|
end
|
108
110
|
|
@@ -17,9 +17,13 @@ module Decidim
|
|
17
17
|
attribute :email, String
|
18
18
|
attribute :ballot_style_code, String
|
19
19
|
|
20
|
+
validates :birthdate, format: { with: /\A\d{8}\z/ }
|
21
|
+
|
20
22
|
validates :full_name,
|
21
23
|
:full_address,
|
24
|
+
:birthdate,
|
22
25
|
presence: true
|
26
|
+
|
23
27
|
def ballot_style_code
|
24
28
|
@ballot_style_code&.upcase
|
25
29
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module Elections
|
5
|
+
# This mailer sends a notification email to a recently added trustee
|
6
|
+
class TrusteeMailer < Decidim::ApplicationMailer
|
7
|
+
include TranslatableAttributes
|
8
|
+
|
9
|
+
# Public: Sends an email to a trustee that just got added to a participatory space.
|
10
|
+
#
|
11
|
+
# user - The user to be notified
|
12
|
+
# participatory_space - The participatory space where the trustee was added.
|
13
|
+
# locale - The locale that will be used for the email content (optional).
|
14
|
+
#
|
15
|
+
# Returns nothing.
|
16
|
+
def notification(user, participatory_space, locale = nil)
|
17
|
+
@user = user
|
18
|
+
@participatory_space = participatory_space
|
19
|
+
@organization = user.organization
|
20
|
+
|
21
|
+
I18n.with_locale(locale || @organization.default_locale) do
|
22
|
+
@participatory_space_title = translated_attribute(participatory_space.title)
|
23
|
+
mail(to: user.email, subject: I18n.t("subject", scope: "decidim.elections.admin.mailers.trustee_mailer", resource_name: @participatory_space_title))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -1,6 +1,4 @@
|
|
1
1
|
$(() => {
|
2
|
-
const isShowMoreButton = ($button) => $button.hasClass("show-more-content");
|
3
|
-
|
4
2
|
const remToPx = (count) => {
|
5
3
|
const unit = $("html").css("font-size");
|
6
4
|
|
@@ -25,17 +23,12 @@ $(() => {
|
|
25
23
|
$content.css("max-height", contentMaxHeight);
|
26
24
|
}
|
27
25
|
|
28
|
-
$button.on("click", (
|
29
|
-
const $buttonTextMore = $button.find(".button-text.show-more-content");
|
26
|
+
$button.on("click", () => {
|
30
27
|
const $buttonTextLess = $button.find(".button-text.show-less-content");
|
31
28
|
|
32
29
|
let newHeight = contentMaxHeight;
|
33
|
-
if (isShowMoreButton($(event.target))) {
|
34
|
-
newHeight = contentHeight;
|
35
|
-
}
|
36
30
|
|
37
31
|
$content.css("max-height", newHeight);
|
38
32
|
$buttonTextLess.toggleClass("hide");
|
39
|
-
$buttonTextMore.toggleClass("hide");
|
40
33
|
});
|
41
34
|
});
|
@@ -8,6 +8,9 @@ module Decidim
|
|
8
8
|
return permission_action unless user
|
9
9
|
return user_allowed_to_read_admin_dashboard? if read_admin_dashboard_action?
|
10
10
|
return permission_action unless permission_action.scope == :admin
|
11
|
+
|
12
|
+
user_can_enter_space_area?
|
13
|
+
|
11
14
|
return permission_action if voting && !voting.is_a?(Decidim::Votings::Voting)
|
12
15
|
|
13
16
|
unless user_can_read_votings_admin_dashboard?
|
@@ -15,7 +18,6 @@ module Decidim
|
|
15
18
|
return permission_action
|
16
19
|
end
|
17
20
|
|
18
|
-
user_can_enter_space_area?
|
19
21
|
allowed_read_participatory_space?
|
20
22
|
allowed_voting_action?
|
21
23
|
|
@@ -17,10 +17,14 @@ module Decidim
|
|
17
17
|
|
18
18
|
def i18n_params
|
19
19
|
super.merge(
|
20
|
-
ballot_style_code:
|
20
|
+
ballot_style_code: ballot_style_code.to_s
|
21
21
|
)
|
22
22
|
end
|
23
23
|
|
24
|
+
def ballot_style_code
|
25
|
+
action_log&.resource&.code || action_log.extra["code"]
|
26
|
+
end
|
27
|
+
|
24
28
|
def action_string
|
25
29
|
case action
|
26
30
|
when "create", "delete", "update"
|
@@ -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>
|
@@ -1,11 +1,13 @@
|
|
1
1
|
<div class="vote-wrapper"
|
2
|
-
data-election-id="
|
3
|
-
data-api-endpoint-url="
|
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="
|
6
|
-
data-voter-id="
|
7
|
-
|
8
|
-
|
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? %>"
|
@@ -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,7 +37,7 @@
|
|
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>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
<div class="row">
|
48
48
|
<div class="columns xlarge-6 census_contact_information">
|
49
|
-
<%= form.text_field :census_contact_information %>
|
49
|
+
<%= form.text_field :census_contact_information, label: t(".census_contact_information") %>
|
50
50
|
<p class="help-text">
|
51
51
|
<%== t(".census_contact_information_help") %>
|
52
52
|
</p>
|
@@ -54,16 +54,16 @@
|
|
54
54
|
</div>
|
55
55
|
|
56
56
|
<div class="row column">
|
57
|
-
<%= form.check_box :promoted %>
|
57
|
+
<%= form.check_box :promoted, label: t(".promoted") %>
|
58
58
|
</div>
|
59
59
|
|
60
60
|
<div class="row">
|
61
61
|
<div class="columns xlarge-4">
|
62
|
-
<%= form.upload :banner_image %>
|
62
|
+
<%= form.upload :banner_image, label: t(".banner_image") %>
|
63
63
|
</div>
|
64
64
|
|
65
65
|
<div class="columns xlarge-4">
|
66
|
-
<%= form.upload :introductory_image %>
|
66
|
+
<%= form.upload :introductory_image, label: t(".introductory_image") %>
|
67
67
|
</div>
|
68
68
|
</div>
|
69
69
|
</div>
|
@@ -1,10 +1,8 @@
|
|
1
1
|
<div>
|
2
|
-
<%= f.
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
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
|
-
|
22
|
-
|
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
|
-
|
26
|
-
|
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
|
-
|
27
|
+
</div>
|
30
28
|
</div>
|
31
29
|
</fieldset>
|
@@ -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!(
|
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">
|
data/config/locales/ar.yml
CHANGED
@@ -1,13 +1,42 @@
|
|
1
1
|
ar:
|
2
|
+
activemodel:
|
3
|
+
attributes:
|
4
|
+
answer:
|
5
|
+
description: الوصف
|
6
|
+
election:
|
7
|
+
description: الوصف
|
8
|
+
question:
|
9
|
+
description: الوصف
|
2
10
|
decidim:
|
3
11
|
elections:
|
12
|
+
admin:
|
13
|
+
steps:
|
14
|
+
tally:
|
15
|
+
invalid: كانت هناك مشكلة في الإبلاغ عن الأمين المفقود
|
16
|
+
mark_as_missing: وضع علامة مفقود
|
17
|
+
mark_as_missing_description: يجب أن يشارك جميع الأمناء في هذه العملية، ولكن إذا لم يتمكن الأمين من المشاركة في العملية، يمكنك وضع علامة على أنها مفقودة.
|
18
|
+
success: وقد تم بنجاح إرسال تقرير الأمين المفقود إلى لوحة الإعلانات
|
19
|
+
tally_completion: وستكتمل هذه العملية عندما يكون جميع الأمناء مُفعلين أو موسومين باعتبارهم مفقودين. مطلوب بحد أدنى %{quorum} من الأمناء لإكمال العملية.
|
20
|
+
undo_mark_as_missing: وسيتمكن الأمين الذي وُضع عليه علامة مفقودة عن طريق الخطأ من المشاركة قبل إتمام العملية. ويمكنهم المضي قدما كالمعتاد وسيتم تجاهل العلامة المفقودة.
|
21
|
+
elections:
|
22
|
+
election_log:
|
23
|
+
results_title: النتائج
|
24
|
+
results:
|
25
|
+
percentage: "%{count}%"
|
4
26
|
trustee_zone:
|
5
27
|
trustees:
|
6
28
|
show:
|
7
29
|
identification_keys:
|
8
30
|
cancel: إلغاء
|
9
31
|
votings:
|
32
|
+
admin:
|
33
|
+
monitoring_committee_election_results:
|
34
|
+
actions:
|
35
|
+
title: الإجراءات
|
10
36
|
polling_officer_zone:
|
11
37
|
closures:
|
38
|
+
edit:
|
39
|
+
modal_ballots_results_count_error:
|
40
|
+
close_modal: غلق
|
12
41
|
sign:
|
13
42
|
cancel: إلغاء
|