decidim-verifications 0.27.0 → 0.27.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eabe14092a2b8578d027cd891e0454b79fe26b8ee21983af6337a2ebcd684df
4
- data.tar.gz: 074aaa11652271e9838ce5c2f8922c768b21bbb84ddf1160de98716024f16204
3
+ metadata.gz: 37e1aefbb36ec2a2391216e8bdbce0cbb71a2706b9f1a9f5e2b4986a7c844377
4
+ data.tar.gz: 4bce481815f23d3ff6a7ab52b93e890f5325c012c04bafaa3dd22fb88ee30907
5
5
  SHA512:
6
- metadata.gz: 7fa6b6ea97991c9b833e2f37ce64cac6df7526f2b56a9921388b51a875e9d602ef99fa8d8fcee5cbeee661687a1e904b8f8f48340779df9fd5b0198c685b0753
7
- data.tar.gz: feb5469de7af030b87d8aa352955bafc1021cb07482b81f090024c4ff0ee15f1432d26ecce29e948f7fd89909df8f8bafcd285b239bdec274369c00700f91261
6
+ metadata.gz: 3b4bde323b7618c2a933d2d1b04ad4e56993f62cc4242894f4f5e17e9e9e3f66ddae09997476287eca72ec27b83114d99e0191a39c25cdb261598def5a920ddc
7
+ data.tar.gz: d4b91c20a67c0dfa85ee1e35c6cd178c4466352c5dce6e70a5ac6f9bf5bc6e398c55cd5187c150ef3e57ff1e6af53ae9cc07b809743785b2297c0b4cb5d12ea3
@@ -20,8 +20,11 @@ module Decidim
20
20
  def call
21
21
  return broadcast(:invalid) unless @form.file
22
22
 
23
+ data = @form.data
24
+ return broadcast(:invalid) unless data
25
+
23
26
  # rubocop:disable Rails/SkipsModelValidations
24
- CsvDatum.insert_all(@organization, @form.data.values)
27
+ CsvDatum.insert_all(@organization, data.values)
25
28
  # rubocop:enable Rails/SkipsModelValidations
26
29
  RemoveDuplicatesJob.perform_later(@organization)
27
30
 
@@ -19,16 +19,18 @@ module Decidim
19
19
  def create
20
20
  enforce_permission_to :create, :authorization
21
21
  @form = form(CensusDataForm).from_params(params)
22
+ @status = Status.new(current_organization)
22
23
  CreateCensusData.call(@form, current_organization) do
23
24
  on(:ok) do
24
25
  flash[:notice] = t(".success", count: @form.data.values.count, errors: @form.data.errors.count)
26
+ redirect_to census_path
25
27
  end
26
28
 
27
29
  on(:invalid) do
28
30
  flash[:alert] = t(".error")
31
+ render :index
29
32
  end
30
33
  end
31
- redirect_to census_path
32
34
  end
33
35
 
34
36
  def destroy_all
@@ -12,6 +12,10 @@ module Decidim
12
12
 
13
13
  def data
14
14
  CsvCensus::Data.new(file.path)
15
+ rescue CSV::MalformedCSVError
16
+ errors.add(:file, :malformed)
17
+
18
+ nil
15
19
  end
16
20
  end
17
21
  end
@@ -34,9 +34,9 @@
34
34
  ...
35
35
  ...
36
36
  </pre>
37
- <%= form_tag census_path, multipart: true, class: "form" do %>
38
- <%= label_tag :name, t("admin.new.file", scope: "decidim.verifications.csv_census") %>
39
- <%= file_field_tag :file %>
37
+ <%= decidim_form_for @form, url: census_path, multipart: true do |form| %>
38
+ <%= label_tag :file, t("admin.new.file", scope: "decidim.verifications.csv_census") %>
39
+ <%= form.file_field :file %>
40
40
  <%= submit_tag t("admin.new.submit", scope: "decidim.verifications.csv_census"), class: "button" %>
41
41
  <% end %>
42
42
  </div>
@@ -24,6 +24,12 @@ ca:
24
24
  postal_letter_postage:
25
25
  full_address: Adreça completa
26
26
  verification_code: Codi de verificació
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Arxiu d'importació mal formatat, si us plau, llegeix les instruccions curosament i assegura't que l'arxiu està codificat en UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ cs:
24
24
  postal_letter_postage:
25
25
  full_address: Celá poštovní adresa
26
26
  verification_code: Ověřovací kód
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Chybný importní soubor, přečtěte si pozorně pokyny a ujistěte se, že soubor je kódovaný UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ en:
24
24
  postal_letter_postage:
25
25
  full_address: Full address
26
26
  verification_code: Verification code
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Malformed import file, please read through the instructions carefully and make sure the file is UTF-8 encoded.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ es-MX:
24
24
  postal_letter_postage:
25
25
  full_address: Dirección completa
26
26
  verification_code: Código de verificación
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Archivo de importación mal formateado, por favor lea las instrucciones cuidadosamente y asegúrese de que el archivo está codificado en UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ es-PY:
24
24
  postal_letter_postage:
25
25
  full_address: Dirección completa
26
26
  verification_code: Código de verificación
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Archivo de importación mal formateado, por favor lea las instrucciones cuidadosamente y asegúrese de que el archivo está codificado en UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ es:
24
24
  postal_letter_postage:
25
25
  full_address: Dirección completa
26
26
  verification_code: Código de verificación
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Archivo de importación mal formateado, por favor lea las instrucciones cuidadosamente y asegúrese de que el archivo está codificado en UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ eu:
24
24
  postal_letter_postage:
25
25
  full_address: Helbide osoa
26
26
  verification_code: Egiaztapen kodea
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Fitxategia akastuna da. Irakurri arretaz jarraibideak eta ziurtatu fitxategia UTF-8an kodifikatuta dagoela.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -76,6 +82,13 @@ eu:
76
82
  postal_letter:
77
83
  explanation: Posta-gutun bat bidaliko dizugu, sartu behar duzun kode batekin, beraz, zure helbidea egiaztatu ahal izango dugu
78
84
  name: Kodea posta bidez
85
+ events:
86
+ verifications:
87
+ verify_with_managed_user:
88
+ email_intro: <a href="%{resource_url}">%{resource_title}</a> parte-hartzailea (<a href="%{managed_user_url}">%{managed_user_name}</a>) parte-hartzaileaen datuekin egiaztatzen saiatu da.
89
+ email_outro: Egiaztau <a href="%{conflicts_url}">gatazken zerrenda </a> eta jarri harremanetan parte-hartzailearekin bere datuak egiaztatu eta arazoa konpontzeko.
90
+ email_subject: Errorea beste parte-hartzaile baten bidez egiaztatzeagatik
91
+ notification_title: <a href="%{resource_url}">%{resource_title}</a> parte-hartzailea (<a href="%{managed_user_url}">%{managed_user_name}</a>) parte-hartzaileaen datuekin egiaztatzen saiatu da.
79
92
  verifications:
80
93
  authorizations:
81
94
  authorization_metadata:
@@ -24,6 +24,12 @@ fi-pl:
24
24
  postal_letter_postage:
25
25
  full_address: Koko osoite
26
26
  verification_code: Vahvistuskoodi
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Virheellinen tuontitiedosto, lue ohjeet huolellisesti ja varmista, että tiedosto on UTF-8 muodossa.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ fi:
24
24
  postal_letter_postage:
25
25
  full_address: Koko osoite
26
26
  verification_code: Vahvistuskoodi
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Virheellinen tuontitiedosto, lue ohjeet huolellisesti ja varmista, että tiedosto on UTF-8 muodossa.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ fr-CA:
24
24
  postal_letter_postage:
25
25
  full_address: Adresse complète
26
26
  verification_code: Code de vérification
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Fichier d'importation mal formé, veuillez lire attentivement les instructions et assurez-vous que le fichier est encodé en UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -24,6 +24,12 @@ fr:
24
24
  postal_letter_postage:
25
25
  full_address: Adresse complète
26
26
  verification_code: Code de vérification
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: Fichier d'importation mal formé, veuillez lire attentivement les instructions et assurez-vous que le fichier est encodé en UTF-8.
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -0,0 +1 @@
1
+ gn:
@@ -24,6 +24,12 @@ ja:
24
24
  postal_letter_postage:
25
25
  full_address: フルアドレス
26
26
  verification_code: 確認コード
27
+ errors:
28
+ models:
29
+ census_data:
30
+ attributes:
31
+ file:
32
+ malformed: インポートファイルの形式が正しくありません。手順を見直して、ファイルがUTF-8でエンコードされていることを確認してください。
27
33
  decidim:
28
34
  admin:
29
35
  menu:
@@ -0,0 +1 @@
1
+ lo:
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-verifications version.
5
5
  module Verifications
6
6
  def self.version
7
- "0.27.0"
7
+ "0.27.1"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-verifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodriguez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-29 00:00:00.000000000 Z
11
+ date: 2022-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.27.0
19
+ version: 0.27.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.27.0
26
+ version: 0.27.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-admin
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.27.0
33
+ version: 0.27.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.27.0
40
+ version: 0.27.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-dev
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.27.0
47
+ version: 0.27.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.27.0
54
+ version: 0.27.1
55
55
  description: Several verification methods for your decidim instance
56
56
  email:
57
57
  - deivid.rodriguez@riseup.net
@@ -170,6 +170,7 @@ files:
170
170
  - config/locales/fr.yml
171
171
  - config/locales/ga-IE.yml
172
172
  - config/locales/gl.yml
173
+ - config/locales/gn-PY.yml
173
174
  - config/locales/hr-HR.yml
174
175
  - config/locales/hr.yml
175
176
  - config/locales/hu.yml
@@ -182,6 +183,7 @@ files:
182
183
  - config/locales/ko.yml
183
184
  - config/locales/lb-LU.yml
184
185
  - config/locales/lb.yml
186
+ - config/locales/lo-LA.yml
185
187
  - config/locales/lt-LT.yml
186
188
  - config/locales/lt.yml
187
189
  - config/locales/lv.yml