decidim-elections 0.27.4 → 0.27.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/ar.yml +0 -2
- data/config/locales/bg.yml +366 -0
- data/config/locales/ca.yml +9 -9
- data/config/locales/cs.yml +5 -2
- data/config/locales/de.yml +8 -8
- data/config/locales/el.yml +1 -7
- data/config/locales/es-MX.yml +5 -5
- data/config/locales/es-PY.yml +4 -4
- data/config/locales/es.yml +9 -9
- data/config/locales/eu.yml +213 -81
- data/config/locales/fi-plain.yml +2 -2
- data/config/locales/fi.yml +4 -4
- data/config/locales/fr-CA.yml +24 -2
- data/config/locales/fr.yml +24 -2
- data/config/locales/gl.yml +5 -2
- data/config/locales/he-IL.yml +1 -0
- data/config/locales/hu.yml +21 -4
- data/config/locales/it.yml +4 -9
- data/config/locales/ja.yml +12 -12
- data/config/locales/lt.yml +47 -5
- data/config/locales/lv.yml +0 -4
- data/config/locales/nl.yml +3 -8
- data/config/locales/no.yml +7 -5
- data/config/locales/pl.yml +11 -7
- data/config/locales/pt-BR.yml +129 -5
- data/config/locales/pt.yml +0 -6
- data/config/locales/ro-RO.yml +3 -4
- data/config/locales/ru.yml +5 -0
- data/config/locales/sk.yml +5 -0
- data/config/locales/sq-AL.yml +1 -0
- data/config/locales/sv.yml +18 -3
- data/config/locales/th-TH.yml +1 -0
- data/config/locales/tr-TR.yml +7 -4
- data/config/locales/uk.yml +5 -0
- data/config/locales/zh-CN.yml +8 -5
- data/config/locales/zh-TW.yml +0 -5
- data/db/migrate/20210310120708_add_followable_counter_cache_to_votings.rb +6 -2
- data/decidim-elections.gemspec +37 -0
- data/lib/decidim/elections/version.rb +1 -1
- data/lib/decidim/votings/admin_engine.rb +1 -1
- data/lib/decidim/votings/voting_serializer.rb +2 -2
- metadata +21 -19
- data/app/forms/decidim/votings/admin/voting_role_form.rb +0 -29
- data/config/environment.rb +0 -0
data/config/locales/sv.yml
CHANGED
@@ -25,14 +25,17 @@ sv:
|
|
25
25
|
location: Plats
|
26
26
|
location_hints: Detaljer om platsen
|
27
27
|
polling_station_managers: Koordinatorer
|
28
|
+
polling_station_president_id: Ordförande
|
28
29
|
title: Titel
|
29
30
|
question:
|
30
31
|
max_selections: Maximalt antal val
|
31
32
|
title: Titel
|
32
33
|
voting:
|
33
34
|
banner_image: Bannerbild
|
35
|
+
description: Beskrivning
|
34
36
|
end_time: Omröstningen avslutas
|
35
37
|
promoted: Annonserad
|
38
|
+
scope_id: Omfång
|
36
39
|
start_time: Omröstningen börjar
|
37
40
|
title: Titel
|
38
41
|
voting_type: Rösttyp
|
@@ -104,6 +107,7 @@ sv:
|
|
104
107
|
label: Bekräftad
|
105
108
|
values:
|
106
109
|
'false': Bekräftad
|
110
|
+
'true': Ej validerad
|
107
111
|
components:
|
108
112
|
elections:
|
109
113
|
actions:
|
@@ -392,7 +396,9 @@ sv:
|
|
392
396
|
task: Uppgift
|
393
397
|
start: Start
|
394
398
|
status:
|
399
|
+
completed: Slutförd
|
395
400
|
pending: Väntande
|
401
|
+
processing: Bearbetar
|
396
402
|
menu:
|
397
403
|
trustee_zone: Förvaltarzon
|
398
404
|
trustees:
|
@@ -468,7 +474,6 @@ sv:
|
|
468
474
|
continue: Nästa
|
469
475
|
warnings:
|
470
476
|
no_elections_warning: Inga omröstningar matchar dina sökkriterier eller det finns ingen omröstning planerad.
|
471
|
-
no_scheduled_elections_warning: För närvarande finns det inga planerade omröstningar, men här hittar du alla tidigare omröstningar listade.
|
472
477
|
events:
|
473
478
|
elections:
|
474
479
|
election_published:
|
@@ -505,8 +510,13 @@ sv:
|
|
505
510
|
title: Valtyper
|
506
511
|
new:
|
507
512
|
create: Skapa
|
513
|
+
content_blocks:
|
514
|
+
landing_page:
|
515
|
+
header:
|
516
|
+
name: Omröstningsbanner
|
517
|
+
metrics:
|
518
|
+
name: Omröstningsmetrik
|
508
519
|
index:
|
509
|
-
not_published: Ej publicerade
|
510
520
|
published: Publicerad
|
511
521
|
landing_page:
|
512
522
|
content_blocks:
|
@@ -635,6 +645,7 @@ sv:
|
|
635
645
|
admin:
|
636
646
|
census:
|
637
647
|
new:
|
648
|
+
submit: Skicka in CSV
|
638
649
|
title: Skapa census
|
639
650
|
document_types:
|
640
651
|
dni: ID-kort
|
@@ -657,6 +668,10 @@ sv:
|
|
657
668
|
destroy: Radera
|
658
669
|
new: Ny medlem
|
659
670
|
title: Åtgärder
|
671
|
+
pages:
|
672
|
+
home:
|
673
|
+
highlighted_votings:
|
674
|
+
active_votings: Activa omröstningar
|
660
675
|
polling_officer_zone:
|
661
676
|
closures:
|
662
677
|
certify:
|
@@ -734,6 +749,7 @@ sv:
|
|
734
749
|
check_census:
|
735
750
|
check_status: Kontrollera status
|
736
751
|
success:
|
752
|
+
access_link: via e-post.
|
737
753
|
access_link_with_sms: via SMS eller e-post.
|
738
754
|
title: Kan jag rösta?
|
739
755
|
check_fields:
|
@@ -794,7 +810,6 @@ sv:
|
|
794
810
|
hybrid: Hybrid
|
795
811
|
in_person: Fysisk
|
796
812
|
online: Online
|
797
|
-
voting_types_label: Rösttyp
|
798
813
|
layouts:
|
799
814
|
decidim:
|
800
815
|
election_votes_header:
|
@@ -0,0 +1 @@
|
|
1
|
+
th:
|
data/config/locales/tr-TR.yml
CHANGED
@@ -125,8 +125,6 @@ tr:
|
|
125
125
|
name: Cevap
|
126
126
|
election:
|
127
127
|
name: Seçim
|
128
|
-
question:
|
129
|
-
name: Soru
|
130
128
|
trustee:
|
131
129
|
name: Vekil
|
132
130
|
proposals_imports:
|
@@ -281,7 +279,6 @@ tr:
|
|
281
279
|
invalid_key: Yüklenen dosyadaki kimlik anahtarları yüklenemez.
|
282
280
|
not_supported_browser_description: Vekil olarak hareket etmek için kullanılamayan bir web tarayıcısı kullanıyorsunuz gibi görünüyor. Vekil görevlerinizi tamamlayabilmek için tarayıcınızın en son sürümünü kullandığınızdan emin olun veya en popüler tarayıcılardan herhangi birini kullanmayı deneyin.
|
283
281
|
not_supported_browser_title: Vekil kişi olarak hareket etmek için tarayıcıyı yükseltin
|
284
|
-
trustee_role_description: Bu platformda kutlanan bazı seçimlerde Vekil olarak görev yapmakla görevlendirildiniz.
|
285
282
|
update:
|
286
283
|
success: Tanımlama genel anahtarınız başarıyla saklandı.
|
287
284
|
votes:
|
@@ -320,7 +317,6 @@ tr:
|
|
320
317
|
continue: Sonraki
|
321
318
|
warnings:
|
322
319
|
no_elections_warning: Arama kriterlerinize uyan seçim yok veya planlanmış bir seçim yok.
|
323
|
-
no_scheduled_elections_warning: Şu anda planlanmış bir seçim yok, ancak burada listelenen tüm geçmiş seçimleri bulabilirsiniz.
|
324
320
|
events:
|
325
321
|
elections:
|
326
322
|
election_published:
|
@@ -363,6 +359,13 @@ tr:
|
|
363
359
|
name: Oylama istatistikleri
|
364
360
|
timeline:
|
365
361
|
name: Oylama Zaman Çizelgesi
|
362
|
+
polling_officers:
|
363
|
+
polling_officers_picker:
|
364
|
+
close: Kapat
|
365
|
+
votings:
|
366
|
+
actions:
|
367
|
+
publish: Yayınla
|
368
|
+
unpublish: Yayımdan Kaldır
|
366
369
|
content_blocks:
|
367
370
|
landing_page:
|
368
371
|
description:
|
data/config/locales/uk.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
@@ -102,10 +102,6 @@ zh-CN:
|
|
102
102
|
models:
|
103
103
|
answer:
|
104
104
|
name: 答案
|
105
|
-
election:
|
106
|
-
name: 选举
|
107
|
-
question:
|
108
|
-
name: 问
|
109
105
|
proposals_imports:
|
110
106
|
create:
|
111
107
|
invalid: 将建议导入答案时遇到问题
|
@@ -220,7 +216,6 @@ zh-CN:
|
|
220
216
|
continue: 下一个
|
221
217
|
warnings:
|
222
218
|
no_elections_warning: 没有符合您的搜索条件的选项,或者没有排定任何选区。
|
223
|
-
no_scheduled_elections_warning: 目前没有预定的选举,但是你们可以在这里看到过去的所有选举都被列入清单。
|
224
219
|
events:
|
225
220
|
elections:
|
226
221
|
election_published:
|
@@ -229,6 +224,14 @@ zh-CN:
|
|
229
224
|
email_subject: '%{resource_title} 的选举现在对 %{participatory_space_title} 生效。'
|
230
225
|
notification_title: <a href="%{resource_path}">%{resource_title}</a> 选区现已启用 %{participatory_space_title}。
|
231
226
|
votings:
|
227
|
+
admin:
|
228
|
+
polling_officers:
|
229
|
+
polling_officers_picker:
|
230
|
+
close: 关闭
|
231
|
+
votings:
|
232
|
+
actions:
|
233
|
+
publish: 发布
|
234
|
+
unpublish: 取消发布
|
232
235
|
polling_officer_zone:
|
233
236
|
closures:
|
234
237
|
new:
|
data/config/locales/zh-TW.yml
CHANGED
@@ -632,7 +632,6 @@ zh-TW:
|
|
632
632
|
upload_legend: 伺服器上有您的公開識別金鑰,但您的瀏覽器仍然沒有。您需要從生成金鑰後創建的備份中,將識別金鑰檔案匯入您的電腦中。
|
633
633
|
not_supported_browser_description: 看起來您使用的網頁瀏覽器無法用作受託人的身份。請確保您使用的是最新版本的瀏覽器,或嘗試使用任何最流行的瀏覽器,以便能夠完成您的受託人任務。
|
634
634
|
not_supported_browser_title: 升級瀏覽器以作為受託人
|
635
|
-
trustee_role_description: 您已被指派在此平台上的某些選舉中擔任受託人。
|
636
635
|
update:
|
637
636
|
success: 您的識別公鑰已成功存儲。
|
638
637
|
votes:
|
@@ -723,7 +722,6 @@ zh-TW:
|
|
723
722
|
continue: 下一個
|
724
723
|
warnings:
|
725
724
|
no_elections_warning: 沒有符合您的搜尋條件的選舉,或者目前沒有已安排的選舉。
|
726
|
-
no_scheduled_elections_warning: 目前沒有即將舉行的選舉,但在這裡您可以找到所有過去的選舉列表。
|
727
725
|
events:
|
728
726
|
elections:
|
729
727
|
election_published:
|
@@ -809,7 +807,6 @@ zh-TW:
|
|
809
807
|
description:
|
810
808
|
name: 投票說明
|
811
809
|
index:
|
812
|
-
not_published: 尚未發布
|
813
810
|
published: 已發佈
|
814
811
|
landing_page:
|
815
812
|
content_blocks:
|
@@ -1015,7 +1012,6 @@ zh-TW:
|
|
1015
1012
|
select_a_voting_type: 請選擇一種投票類型。
|
1016
1013
|
show_check_census_help: 是否在公開投票菜單中顯示「我可以投票嗎?」鏈接
|
1017
1014
|
slug: 附址
|
1018
|
-
slug_help: 'URL slugs 用於產生指向此投票的網址。它只接受字母、數字和連字符,且必須以字母開頭。例如: %{url}'
|
1019
1015
|
title: 標題
|
1020
1016
|
voting_type:
|
1021
1017
|
hybrid: 混合
|
@@ -1149,7 +1145,6 @@ zh-TW:
|
|
1149
1145
|
certify:
|
1150
1146
|
add_images: 添加圖案
|
1151
1147
|
error: 附加憑證時發生錯誤,請稍後再試。
|
1152
|
-
form_legend: 上傳選舉結束憑證的照片
|
1153
1148
|
heading: 投票重新點算 - 上傳憑證
|
1154
1149
|
info_text: 請上傳選舉結束憑證的照片。
|
1155
1150
|
submit: 上傳憑證
|
@@ -1,13 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class AddFollowableCounterCacheToVotings < ActiveRecord::Migration[5.2]
|
4
|
+
class Voting < ApplicationRecord
|
5
|
+
self.table_name = :decidim_votings_votings
|
6
|
+
end
|
7
|
+
|
4
8
|
def change
|
5
9
|
add_column :decidim_votings_votings, :follows_count, :integer, null: false, default: 0, index: true
|
6
10
|
|
7
11
|
reversible do |dir|
|
8
12
|
dir.up do
|
9
|
-
|
10
|
-
|
13
|
+
Voting.reset_column_information
|
14
|
+
Voting.find_each do |record|
|
11
15
|
record.class.reset_counters(record.id, :follows)
|
12
16
|
end
|
13
17
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
require "decidim/elections/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.version = Decidim::Elections.version
|
9
|
+
s.authors = ["Leonardo Diez", "Agustí B.R."]
|
10
|
+
s.email = ["leo@codegram.com", "agusti@codegram.com"]
|
11
|
+
s.license = "AGPL-3.0"
|
12
|
+
s.homepage = "https://github.com/decidim/decidim-elections"
|
13
|
+
s.required_ruby_version = "~> 3.0.0"
|
14
|
+
|
15
|
+
s.name = "decidim-elections"
|
16
|
+
s.summary = "A decidim elections module (votings space and elections component)"
|
17
|
+
s.description = "The Elections module adds elections to any participatory space."
|
18
|
+
|
19
|
+
s.files = Dir.chdir(__dir__) do
|
20
|
+
`git ls-files -z`.split("\x0").select do |f|
|
21
|
+
(File.expand_path(f) == __FILE__) ||
|
22
|
+
f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
s.add_dependency "decidim-bulletin_board", "0.23"
|
27
|
+
s.add_dependency "voting_schemes-dummy", "0.23"
|
28
|
+
s.add_dependency "voting_schemes-electionguard", "0.23"
|
29
|
+
|
30
|
+
s.add_dependency "decidim-core", Decidim::Elections.version
|
31
|
+
s.add_dependency "decidim-forms", Decidim::Elections.version
|
32
|
+
s.add_dependency "decidim-proposals", Decidim::Elections.version
|
33
|
+
s.add_dependency "rack-attack", "~> 6.0"
|
34
|
+
|
35
|
+
s.add_development_dependency "decidim-admin", Decidim::Elections.version
|
36
|
+
s.add_development_dependency "decidim-dev", Decidim::Elections.version
|
37
|
+
end
|
@@ -86,7 +86,7 @@ module Decidim
|
|
86
86
|
initializer "decidim_votings.admin_votings_components_menu" do
|
87
87
|
Decidim.menu :admin_votings_components_menu do |menu|
|
88
88
|
current_participatory_space.components.each do |component|
|
89
|
-
caption =
|
89
|
+
caption = decidim_escape_translated(component.name)
|
90
90
|
if component.primary_stat.present?
|
91
91
|
caption += content_tag(:span, component.primary_stat, class: component.primary_stat.zero? ? "component-counter component-counter--off" : "component-counter")
|
92
92
|
end
|
@@ -21,8 +21,8 @@ module Decidim
|
|
21
21
|
url: url,
|
22
22
|
title: voting.title,
|
23
23
|
description: voting.description,
|
24
|
-
start_time: voting.start_time
|
25
|
-
end_time: voting.end_time
|
24
|
+
start_time: voting.start_time,
|
25
|
+
end_time: voting.end_time,
|
26
26
|
voting_type: translated_voting_type,
|
27
27
|
scope: {
|
28
28
|
id: voting.scope.try(:id),
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-elections
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.27.
|
4
|
+
version: 0.27.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Diez
|
8
8
|
- Agustí B.R.
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: decidim-bulletin_board
|
@@ -59,42 +59,42 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - '='
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.27.
|
62
|
+
version: 0.27.6
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - '='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.27.
|
69
|
+
version: 0.27.6
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: decidim-forms
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.27.
|
76
|
+
version: 0.27.6
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - '='
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 0.27.
|
83
|
+
version: 0.27.6
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: decidim-proposals
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - '='
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.27.
|
90
|
+
version: 0.27.6
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - '='
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.27.
|
97
|
+
version: 0.27.6
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rack-attack
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,28 +115,28 @@ dependencies:
|
|
115
115
|
requirements:
|
116
116
|
- - '='
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.27.
|
118
|
+
version: 0.27.6
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - '='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.27.
|
125
|
+
version: 0.27.6
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: decidim-dev
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - '='
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.27.
|
132
|
+
version: 0.27.6
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - '='
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.27.
|
139
|
+
version: 0.27.6
|
140
140
|
description: The Elections module adds elections to any participatory space.
|
141
141
|
email:
|
142
142
|
- leo@codegram.com
|
@@ -334,7 +334,6 @@ files:
|
|
334
334
|
- app/forms/decidim/votings/admin/polling_station_form.rb
|
335
335
|
- app/forms/decidim/votings/admin/publish_results_form.rb
|
336
336
|
- app/forms/decidim/votings/admin/voting_form.rb
|
337
|
-
- app/forms/decidim/votings/admin/voting_role_form.rb
|
338
337
|
- app/forms/decidim/votings/answer_result_form.rb
|
339
338
|
- app/forms/decidim/votings/ballot_result_form.rb
|
340
339
|
- app/forms/decidim/votings/census/admin/dataset_form.rb
|
@@ -643,7 +642,6 @@ files:
|
|
643
642
|
- app/views/layouts/decidim/voting_landing.html.erb
|
644
643
|
- app/views/layouts/decidim/votings.html.erb
|
645
644
|
- config/assets.rb
|
646
|
-
- config/environment.rb
|
647
645
|
- config/initializers/decidim_bulletin_board.rb
|
648
646
|
- config/initializers/rack_attack.rb
|
649
647
|
- config/locales/am-ET.yml
|
@@ -674,6 +672,7 @@ files:
|
|
674
672
|
- config/locales/ga-IE.yml
|
675
673
|
- config/locales/gl.yml
|
676
674
|
- config/locales/gn-PY.yml
|
675
|
+
- config/locales/he-IL.yml
|
677
676
|
- config/locales/hr-HR.yml
|
678
677
|
- config/locales/hr.yml
|
679
678
|
- config/locales/hu.yml
|
@@ -707,9 +706,11 @@ files:
|
|
707
706
|
- config/locales/sk.yml
|
708
707
|
- config/locales/sl.yml
|
709
708
|
- config/locales/so-SO.yml
|
709
|
+
- config/locales/sq-AL.yml
|
710
710
|
- config/locales/sr-CS.yml
|
711
711
|
- config/locales/sv.yml
|
712
712
|
- config/locales/sw-KE.yml
|
713
|
+
- config/locales/th-TH.yml
|
713
714
|
- config/locales/ti-ER.yml
|
714
715
|
- config/locales/tr-TR.yml
|
715
716
|
- config/locales/uk.yml
|
@@ -769,6 +770,7 @@ files:
|
|
769
770
|
- db/seeds/Exampledocument.pdf
|
770
771
|
- db/seeds/city.jpeg
|
771
772
|
- db/seeds/city2.jpeg
|
773
|
+
- decidim-elections.gemspec
|
772
774
|
- lib/decidim/api/bulletin_board_closure_type.rb
|
773
775
|
- lib/decidim/api/election_answer_type.rb
|
774
776
|
- lib/decidim/api/election_question_type.rb
|
@@ -813,15 +815,15 @@ homepage: https://github.com/decidim/decidim-elections
|
|
813
815
|
licenses:
|
814
816
|
- AGPL-3.0
|
815
817
|
metadata: {}
|
816
|
-
post_install_message:
|
818
|
+
post_install_message:
|
817
819
|
rdoc_options: []
|
818
820
|
require_paths:
|
819
821
|
- lib
|
820
822
|
required_ruby_version: !ruby/object:Gem::Requirement
|
821
823
|
requirements:
|
822
|
-
- - "
|
824
|
+
- - "~>"
|
823
825
|
- !ruby/object:Gem::Version
|
824
|
-
version:
|
826
|
+
version: 3.0.0
|
825
827
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
826
828
|
requirements:
|
827
829
|
- - ">="
|
@@ -829,7 +831,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
829
831
|
version: '0'
|
830
832
|
requirements: []
|
831
833
|
rubygems_version: 3.2.22
|
832
|
-
signing_key:
|
834
|
+
signing_key:
|
833
835
|
specification_version: 4
|
834
836
|
summary: A decidim elections module (votings space and elections component)
|
835
837
|
test_files: []
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Votings
|
5
|
-
module Admin
|
6
|
-
# Base class to be inherited by other forms that have roles
|
7
|
-
# in the Votings space
|
8
|
-
class VotingRoleForm < Decidim::Form
|
9
|
-
attribute :name, String
|
10
|
-
attribute :email, String
|
11
|
-
attribute :user_id, Integer
|
12
|
-
attribute :existing_user, Boolean, default: false
|
13
|
-
|
14
|
-
validates :email, presence: true, format: { with: ::Devise.email_regexp }, unless: ->(form) { form.existing_user }
|
15
|
-
validates :name, presence: true, format: { with: UserBaseEntity::REGEXP_NAME }, unless: ->(form) { form.existing_user }
|
16
|
-
validates :user, presence: true, if: ->(form) { form.existing_user }
|
17
|
-
|
18
|
-
def map_model(model)
|
19
|
-
self.user_id = model.decidim_user_id
|
20
|
-
self.existing_user = user_id.present?
|
21
|
-
end
|
22
|
-
|
23
|
-
def user
|
24
|
-
@user ||= current_organization.users.find_by(id: user_id)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/config/environment.rb
DELETED
File without changes
|