decidim-direct_verifications 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/app/commands/decidim/direct_verifications/verification/create_import.rb +19 -10
  4. data/app/controllers/decidim/direct_verifications/verification/admin/authorizations_controller.rb +2 -0
  5. data/app/jobs/decidim/direct_verifications/authorize_users_job.rb +2 -0
  6. data/app/jobs/decidim/direct_verifications/base_import_job.rb +22 -6
  7. data/app/jobs/decidim/direct_verifications/register_users_job.rb +1 -0
  8. data/app/jobs/decidim/direct_verifications/revoke_users_job.rb +1 -0
  9. data/app/packs/entrypoints/decidim_direct_verifications.js +4 -0
  10. data/app/packs/entrypoints/decidim_direct_verifications.scss +1 -0
  11. data/app/packs/src/decidim/direct_verifications/admin/checkboxes.js +7 -0
  12. data/app/{assets/stylesheets/decidim/direct_verifications → packs/stylesheets/decidim/direct_verifications/admin}/authorizations.scss +1 -1
  13. data/app/views/decidim/direct_verifications/verification/admin/authorizations/index.html.erb +2 -1
  14. data/app/views/decidim/direct_verifications/verification/admin/direct_verifications/index.html.erb +1 -1
  15. data/app/views/decidim/direct_verifications/verification/admin/imports/new.html.erb +1 -1
  16. data/config/assets.rb +24 -0
  17. data/config/locales/ca.yml +40 -26
  18. data/config/locales/cs.yml +17 -2
  19. data/config/locales/en.yml +37 -33
  20. data/config/locales/es.yml +39 -25
  21. data/config/locales/fr.yml +17 -2
  22. data/lib/decidim/direct_verifications/parsers/metadata_parser.rb +5 -11
  23. data/lib/decidim/direct_verifications/tests/verification_controller_examples.rb +5 -5
  24. data/lib/decidim/direct_verifications/verification/admin_engine.rb +2 -5
  25. data/lib/decidim/direct_verifications/version.rb +3 -3
  26. data/package.json +192 -0
  27. metadata +13 -11
  28. data/app/assets/config/direct_verifications_admin_manifest.css +0 -3
  29. data/app/assets/config/direct_verifications_admin_manifest.js +0 -1
  30. data/app/assets/javascripts/decidim/direct_verifications/verification/admin/direct_verifications_admin.js.es6 +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46d0f12ed4661879a4cdec82f1482875823fe9c5f4fba39c129e2a020d3c7f19
4
- data.tar.gz: 5cf039fb0a1b3474082dbf7acc28013d8d0034c6d959c7c7ad589aca85c1fdf8
3
+ metadata.gz: e42a469a3e54d28a703c6565abdb73aa70d33c540882e8737c0e92592d18d238
4
+ data.tar.gz: 1c2ff4b72713ad26ba30b350efbcc31840fa42aac1f171faa32f0b1b64596d22
5
5
  SHA512:
6
- metadata.gz: 4f960edacf1528f9801d6cfd82aa6898a5bffbf9233a2386a57cdb0c55c0a3d5ef45ddf501d1775db1ab325dbcd61925b012dcc3ab8bf83bedbd4630abbf3b03
7
- data.tar.gz: 909e8c8be3368861bc6fe75c1290f820a4d697e20bf4ded85d9e91ec9a5b7a27d3aa65953d749460d3fe0efbfe132fd8aa586ac27e032782127463be98476a61
6
+ metadata.gz: 1514cdfd920925b28b1d89e4c615a4ce0a97ceca4a85fcffab0706e6b740e0ae11541c04ce77a992da7aa21ef6b289795abf8cd3ccb950f7c1613531b3f57460
7
+ data.tar.gz: 618916a01ea8ac5fb19188e1b10d15c56a40ed6648da422d5d48c16a93feb8a2ff1f5507ac88f62a08c0651a704fb5c2a5efa502d887b2df07b6eb1bca8f66a4
data/README.md CHANGED
@@ -73,6 +73,7 @@ Depending on your Decidim version, you might want to specify the version to ensu
73
73
 
74
74
  | Direct Verifications version | Compatible Decidim versions |
75
75
  |---|---|
76
+ | 1.1 | >= 0.25.x |
76
77
  | 1.0 | >= 0.23.x |
77
78
  | 0.22.x | 0.22.x |
78
79
 
@@ -17,13 +17,14 @@ module Decidim
17
17
 
18
18
  case action
19
19
  when :register
20
- register_users_async
20
+ register_users_async(remove_file: true)
21
+ when :authorize
22
+ authorize_users_async(remove_file: true)
21
23
  when :register_and_authorize
22
24
  register_users_async
23
- file.rewind
24
- authorize_users_async
25
+ authorize_users_async(remove_file: true)
25
26
  when :revoke
26
- revoke_users_async
27
+ revoke_users_async(remove_file: true)
27
28
  end
28
29
 
29
30
  broadcast(:ok)
@@ -33,16 +34,24 @@ module Decidim
33
34
 
34
35
  attr_reader :form, :file, :organization, :user, :action
35
36
 
36
- def register_users_async
37
- RegisterUsersJob.perform_later(file.read, organization, user, form.authorization_handler)
37
+ def register_users_async(options = {})
38
+ RegisterUsersJob.perform_later(blob.id, organization, user, form.authorization_handler, options)
39
+ end
40
+
41
+ def revoke_users_async(options = {})
42
+ RevokeUsersJob.perform_later(blob.id, organization, user, form.authorization_handler, options)
43
+ end
44
+
45
+ def authorize_users_async(options = {})
46
+ AuthorizeUsersJob.perform_later(blob.id, organization, user, form.authorization_handler, options)
38
47
  end
39
48
 
40
- def revoke_users_async
41
- RevokeUsersJob.perform_later(file.read, organization, user, form.authorization_handler)
49
+ def blob
50
+ @blob ||= ActiveStorage::Blob.create_and_upload!(io: file, filename: secure_name)
42
51
  end
43
52
 
44
- def authorize_users_async
45
- AuthorizeUsersJob.perform_later(file.read, organization, user, form.authorization_handler)
53
+ def secure_name
54
+ @secure_name ||= "#{SecureRandom.uuid}#{File.extname(file.tempfile)}"
46
55
  end
47
56
  end
48
57
  end
@@ -10,6 +10,8 @@ module Decidim
10
10
  def index
11
11
  enforce_permission_to :index, :authorization
12
12
  @authorizations = collection.includes(:user)
13
+ .page(params[:page])
14
+ .per(15)
13
15
  end
14
16
 
15
17
  def destroy
@@ -8,7 +8,9 @@ module Decidim
8
8
  class NullSession; end
9
9
 
10
10
  def process_users
11
+ Rails.logger.info "AuthorizeUsersJob: Authorizing #{emails.count} emails"
11
12
  emails.each do |email, data|
13
+ Rails.logger.debug "AuthorizeUsersJob: Authorizing #{email}"
12
14
  AuthorizeUser.new(
13
15
  email,
14
16
  data,
@@ -10,20 +10,32 @@ module Decidim
10
10
  class BaseImportJob < ApplicationJob
11
11
  queue_as :default
12
12
 
13
- def perform(userslist, organization, current_user, authorization_handler)
14
- @emails = Parsers::MetadataParser.new(userslist).to_h
13
+ def perform(blob_id, organization, current_user, authorization_handler, options = {})
14
+ @blob = ActiveStorage::Blob.find(blob_id)
15
15
  @organization = organization
16
16
  @current_user = current_user
17
- @instrumenter = Instrumenter.new(current_user)
18
17
  @authorization_handler = authorization_handler
19
18
 
20
- process_users
21
- send_email_notification
19
+ begin
20
+ @emails = Parsers::MetadataParser.new(userslist).to_h
21
+ @instrumenter = Instrumenter.new(current_user)
22
+
23
+ Rails.logger.info "BaseImportJob: Processing file #{@blob.filename}"
24
+ process_users
25
+ send_email_notification
26
+ rescue StandardError => e
27
+ Rails.logger.error "BaseImportJob Error: #{e.message} #{e.backtrace.filter { |f| f =~ /direct_verifications/ }}"
28
+ end
29
+ remove_file! if options.fetch(:remove_file, false)
22
30
  end
23
31
 
24
32
  private
25
33
 
26
- attr_reader :emails, :organization, :current_user, :instrumenter, :authorization_handler
34
+ attr_reader :blob, :emails, :organization, :current_user, :instrumenter, :authorization_handler
35
+
36
+ def userslist
37
+ @userslist ||= blob.download.force_encoding("UTF-8")
38
+ end
27
39
 
28
40
  def send_email_notification
29
41
  ImportMailer.finished_processing(
@@ -33,6 +45,10 @@ module Decidim
33
45
  authorization_handler
34
46
  ).deliver_now
35
47
  end
48
+
49
+ def remove_file!
50
+ blob.purge
51
+ end
36
52
  end
37
53
  end
38
54
  end
@@ -6,6 +6,7 @@ module Decidim
6
6
  module DirectVerifications
7
7
  class RegisterUsersJob < BaseImportJob
8
8
  def process_users
9
+ Rails.logger.info "RegisterUsersJob: Registering #{emails.count} emails"
9
10
  emails.each do |email, data|
10
11
  RegisterUser.new(email, data, organization, current_user, instrumenter).call
11
12
  end
@@ -4,6 +4,7 @@ module Decidim
4
4
  module DirectVerifications
5
5
  class RevokeUsersJob < BaseImportJob
6
6
  def process_users
7
+ Rails.logger.info "RevokeUsersJob: Revoking #{emails.count} emails"
7
8
  emails.each do |email, _name|
8
9
  RevokeUser.new(email, organization, instrumenter, authorization_handler).call
9
10
  end
@@ -0,0 +1,4 @@
1
+ import "src/decidim/direct_verifications/admin/checkboxes.js"
2
+
3
+ // CSS
4
+ import "entrypoints/decidim_direct_verifications.scss";
@@ -0,0 +1 @@
1
+ @import "stylesheets/decidim/direct_verifications/admin/authorizations";
@@ -0,0 +1,7 @@
1
+ // = require_self
2
+
3
+ $(() => {
4
+ $('[type="checkbox"]#register').change(function () {
5
+ $(this).closest("label").find(".callout").toggleClass("hide", !$(this).prop("checked"))
6
+ })
7
+ })
@@ -1,4 +1,4 @@
1
- @import "decidim/admin/utils/settings";
1
+ @import "stylesheets/decidim/admin/utils/settings";
2
2
 
3
3
  $code-color: $black;
4
4
  $code-font-family: $font-family-monospace;
@@ -1,4 +1,4 @@
1
- <%= stylesheet_link_tag "decidim/direct_verifications/authorizations" %>
1
+ <%= stylesheet_pack_tag "decidim_direct_verifications" %>
2
2
 
3
3
  <div class="card">
4
4
  <div class="card-divider">
@@ -37,6 +37,7 @@
37
37
  <% end %>
38
38
  </tbody>
39
39
  </table>
40
+ <%= paginate @authorizations, theme: "decidim" %>
40
41
  </div>
41
42
  </div>
42
43
  </div>
@@ -42,4 +42,4 @@
42
42
  </div>
43
43
  </div>
44
44
 
45
- <%= javascript_include_tag "decidim/direct_verifications/verification/admin/direct_verifications_admin" %>
45
+ <%= javascript_pack_tag "decidim_direct_verifications" %>
@@ -47,4 +47,4 @@
47
47
  </div>
48
48
  </div>
49
49
 
50
- <%= javascript_include_tag "decidim/direct_verifications/verification/admin/direct_verifications_admin" %>
50
+ <%= javascript_pack_tag "decidim_direct_verifications" %>
data/config/assets.rb ADDED
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is located at `config/assets.rb` of your module.
4
+
5
+ # Define the base path of your module. Please note that `Rails.root` may not be
6
+ # used because we are not inside the Rails environment when this file is loaded.
7
+ base_path = File.expand_path("..", __dir__)
8
+
9
+ # Register an additional load path for webpack. All the assets within these
10
+ # directories will be available for inclusion within the Decidim assets. For
11
+ # example, if you have `app/packs/src/decidim/foo.js`, you can include that file
12
+ # in your JavaScript entrypoints (or other JavaScript files within Decidim)
13
+ # using `import "src/decidim/foo"` after you have registered the additional path
14
+ # as follows.
15
+ Decidim::Webpacker.register_path("#{base_path}/app/packs")
16
+
17
+ # Register the entrypoints for your module. These entrypoints can be included
18
+ # within your application using `javascript_pack_tag` and if you include any
19
+ # SCSS files within the entrypoints, they become available for inclusion using
20
+ # `stylesheet_pack_tag`.
21
+ Decidim::Webpacker.register_entrypoints(
22
+ decidim_direct_verifications: "#{base_path}/app/packs/entrypoints/decidim_direct_verifications.js",
23
+ decidim_direct_verifications_css: "#{base_path}/app/packs/entrypoints/decidim_direct_verifications.scss"
24
+ )
@@ -10,12 +10,12 @@ ca:
10
10
  admin:
11
11
  direct_verifications:
12
12
  help:
13
- - 'Permet la introducció massiva d''usuaris per tal de:'
14
- - Registrar-los directament a la organització amb l'enviament d'invitacions
15
- - Verificar-los en qualsevol mètode de verificació actiu
16
- - Revocar la verificació en qualsevol mètode de verificació actiu
13
+ - 'Permet la introducció massiva de participants per tal de:'
14
+ - Registrar-les directament a la organització amb l'enviament d'invitacions
15
+ - Verificar-les amb qualsevol mètode de verificació actiu
16
+ - Revocar la verificació amb qualsevol mètode de verificació actiu
17
17
  direct_verifications:
18
- explanation: Verificació manual per par dels administradors de l'organització
18
+ explanation: Verificació manual per part de les administradores de l'organització
19
19
  name: Verificació directa
20
20
  direct_verifications:
21
21
  verification:
@@ -25,40 +25,54 @@ ca:
25
25
  created_at: Data de creació
26
26
  metadata: Metadades
27
27
  name: Nom
28
- title: Autoritzacions
29
- user_name: Nom d'usuari
30
28
  new_import: Nova importació
29
+ title: Autoritzacions
30
+ user_name: Nom de la participant
31
31
  direct_verifications:
32
32
  create:
33
- authorized: "S'han verificat correctament %{authorized} usuaris utilitzant [%{handler}] (%{count} detectats, %{errors} errors)"
34
- info: "S'han detectat %{count} usuaris, dels quals %{registered} estan registrats, %{authorized} autoritzats utilitzant [%{handler}] (%{unconfirmed} sense confirmar)"
33
+ authorized: "S'han verificat correctament %{authorized} participants utilitzant [%{handler}] (%{count} detectats, %{errors} errors)"
34
+ info: "S'han detectat %{count} participants, de les quals %{registered} estan registrades, %{authorized} autoritzades utilitzant [%{handler}] (%{unconfirmed} sense confirmar)"
35
35
  missing_header: Si us plau, proporcioneu una fila d'encapçalament
36
- registered: "S'han registrat correctament %{registered} usuaris (%{count} detectats, %{errors} errors)"
37
- revoked: S'ha revocat correctament la verificació de %{revoked} usuaris utilitzant [%{handler}] (%{count} detectats, %{errors} errors)
38
- gdpr_disclaimer: Feu-ho sota la vostra responsabilitat. Recordeu que heu de tenir el consentiment explícit dels vostres usuaris per registrar-los. En cas contrari, estareu infringint la regulació GDPR als països de la UE.
36
+ registered: "S'han registrat correctament %{registered} participants (%{count} detectades, %{errors} errors)"
37
+ revoked: S'ha revocat correctament la verificació de %{revoked} participants utilitzant [%{handler}] (%{count} detectades, %{errors} errors)
38
+ gdpr_disclaimer: Feu-ho sota la vostra responsabilitat. Recordeu que heu de tenir el consentiment explícit de les vostres participants per a registrar-les. En cas contrari, estareu infringint la regulació GDPR als països de la UE.
39
+ imports:
40
+ create:
41
+ error: No s'ha pogut importar el fitxer
42
+ success: S'ha importat el fitxer. Rebràs un email quan totes les participants hagin estat importades.
43
+ mailer:
44
+ authorized: "%{successful} participants han estat verificades utilitzant [%{handler}] (%{count} detectades, %{errors} errors)"
45
+ info: "%{count} participants detectades, de les quals %{registered} estan registrades, %{authorized} autoritzades utilitzant [%{handler}] (%{unconfirmed} sense confirmar)"
46
+ registered: "%{successful} participants han estat registrades (%{count} detectades, %{errors} errors) "
47
+ revoked: S'ha revocat correctament la verificació de %{successful} participants utilitzant [%{handler}] (%{count} detectades, %{errors} errors)
48
+ subject: Resultats de la importació
49
+ new:
50
+ file: Fitxer CSV amb dades de participants
51
+ info: Importa un fitxer CSV file amb una participant per línia copiant el format de l'exemple següent
52
+ submit: Pujar fitxer
39
53
  index:
40
- authorizations: Usuaris autoritzats
41
- stats: Estadístiques d'usuaris
42
- title: Inscriu i autoritza usuaris
54
+ authorizations: Participants autoritzades
55
+ stats: Estadístiques de les participants
56
+ title: Inscriu i autoritza participants
43
57
  new:
44
58
  authorization_handler: Mètode de verificació
45
- authorize: Autoritza els usuaris
46
- check: Comprova l'estat dels usuaris
47
- info: Introdueix aquí els emails, un per línia. Si els emails estan precedits per un text, s'interpretarà com el nom de l'usuari
48
- register: Registra els usuaris a la plataforma (si existeixen s'ignoraran)
49
- revoke: Revoca l'autorització dels usuaris
59
+ authorize: Autoritza les participants
60
+ check: Comprova l'estat de les participants
61
+ info_html: Pots <a href=%{link}>importar un fitxer CSV</a> o introduir els emails aquí, un per línia. Si els emails estan precedits per un text, aquest s'interpretarà com el nom de la participant
62
+ register: Registra les participants a la plataforma (si existeixen s'ignoraran)
63
+ revoke: Revoca l'autorització de les participants
50
64
  submit: Envia i processa el llistat
51
- textarea: Llista d''emails
65
+ textarea: Llistat d'emails
52
66
  stats:
53
67
  index:
54
- authorized: Verificats
55
- authorized_unconfirmed: Verificats però no confirmats
68
+ authorized: Verificades
69
+ authorized_unconfirmed: Verificades però no confirmades
56
70
  global: "- Qualsevol mètode de verificació -"
57
- registered: Registrats
58
- unconfirmed: No confirmats
71
+ registered: Registrades
72
+ unconfirmed: No confirmades
59
73
  authorizations:
60
74
  new:
61
- no_action: Aquest mètode requereix que un administrador us verifiqui
75
+ no_action: Aquest mètode requereix que una administradora us verifiqui
62
76
  verifications:
63
77
  authorizations:
64
78
  first_login:
@@ -25,16 +25,31 @@ cs:
25
25
  created_at: Vytvořeno v
26
26
  metadata: Metadata
27
27
  name: Název
28
+ new_import: Nový import
28
29
  title: Autorizace
29
30
  user_name: Uživatelské jméno
30
- new_import: Nový import
31
31
  direct_verifications:
32
32
  create:
33
33
  authorized: "%{authorized} uživatelů bylo úspěšně ověřeno pomocí [%{handler}] (%{count} detekováno, %{errors} chyb)"
34
34
  info: "Zjištěno %{count} uživatelů, z nichž %{registered} jsou registrováni, %{authorized} autorizováni pomocí [%{handler}] (%{unconfirmed} nepotvrzeno)"
35
+ missing_header: Zadejte řádek záhlaví
35
36
  registered: "%{registered} uživatelů bylo úspěšně zaregistrováno (%{count} detekováno, %{errors} chyb) "
36
37
  revoked: Ověření od %{revoked} uživatelů bylo zrušeno pomocí [%{handler}] (%{count} detekováno, %{errors} chyb)
37
38
  gdpr_disclaimer: Udělejte to v rámci vaší odpovědnosti. Nezapomeňte, že potřebujete mít výslovný souhlas svých uživatelů, abyste je mohli zaregistrovat. V opačném případě můžete porušovat nařízení o GDPR v zemích EU.
39
+ imports:
40
+ create:
41
+ error: Při importu souboru došlo k chybě
42
+ success: Soubor byl úspěšně nahrán. Až budou importováni všichni účastníci, pošleme vám e-mail.
43
+ mailer:
44
+ authorized: "%{successful} účastníků bylo úspěšně ověřeno pomocí [%{handler}] (%{count} detekováno, %{errors} chyby)"
45
+ info: "%{count} účastníků detekováno, z toho %{registered} jsou registrováni, %{authorized} povoleno pomocí [%{handler}] (%{unconfirmed} nepotvrzeno)"
46
+ registered: "%{successful} účastníků bylo úspěšně registrováno (%{count} detekováno, %{errors} chyb) "
47
+ revoked: Ověření od %{successful} účastníků bylo zrušeno pomocí [%{handler}] (%{count} detekováno, %{errors} chyby)
48
+ subject: Výsledky importu souboru
49
+ new:
50
+ file: Soubor CSV s daty účastníků
51
+ info: Importovat CSV soubor s účastníkem na řádku, který zkopíruje formát z příkladu
52
+ submit: Nahrát soubor
38
53
  index:
39
54
  authorizations: Autorizovaní uživatelé
40
55
  stats: Statistiky uživatelů
@@ -43,7 +58,7 @@ cs:
43
58
  authorization_handler: Ověřovací metoda
44
59
  authorize: Autorizovat uživatele
45
60
  check: Zkontrolovat stav uživatelů
46
- info: Zadejte e-maily zde, jeden na řádek. Pokud e-mailům předchází text, bude interpretován jako jméno uživatele
61
+ info_html: Můžete <a href=%{link}>importovat CSV</a> nebo zde zadat e-maily, jedno na řádek. Pokud e-mailům předchází text, bude interpretován jako jméno účastníka.
47
62
  register: Registrovat uživatele na platformě (pokud existují, budou ignorováni)
48
63
  revoke: Zrušit autorizaci od uživatelů
49
64
  submit: Odeslat a zpracovat seznam
@@ -11,7 +11,7 @@ en:
11
11
  admin:
12
12
  direct_verifications:
13
13
  help:
14
- - 'Allows the massive introduction of users in order to:'
14
+ - 'Allows the massive introduction of participants in order to:'
15
15
  - Direct register in the organization and sends invitations
16
16
  - Verify them in any active verification method
17
17
  - Revoke their verification in any active verification method
@@ -21,57 +21,61 @@ en:
21
21
  direct_verifications:
22
22
  verification:
23
23
  admin:
24
- imports:
25
- new:
26
- info: Import a CSV file with a user entry per line copying the format from the example below
27
- submit: Upload file
28
- file: CSV file with users data
29
- create:
30
- success: File successfully uploaded. We'll email you when all users are imported.
31
- error: There was an error importing the file
32
- mailer:
33
- subject: File import results
34
- authorized: "%{successful} users have been successfully verified using
35
- [%{handler}] (%{count} detected, %{errors} errors)"
36
- info: "%{count} users detected, of which %{registered} are registered,
37
- %{authorized} authorized using [%{handler}] (%{unconfirmed} unconfirmed)"
38
- registered: "%{successful} users have been successfully registered (%{count}
39
- detected, %{errors} errors) "
40
- revoked: Verification from %{successful} users have been revoked using
41
- [%{handler}] (%{count} detected, %{errors} errors)
42
24
  authorizations:
43
25
  index:
44
26
  created_at: Created at
45
27
  metadata: Metadata
46
28
  name: Name
47
- title: Authorizations
48
- user_name: User name
49
29
  new_import: New import
30
+ title: Authorizations
31
+ user_name: Participant name
50
32
  direct_verifications:
51
33
  create:
52
- authorized: "%{authorized} users have been successfully verified using
34
+ authorized: "%{authorized} participants have been successfully verified using
53
35
  [%{handler}] (%{count} detected, %{errors} errors)"
54
- info: "%{count} users detected, of which %{registered} are registered,
36
+ info: "%{count} participants detected, of which %{registered} are registered,
55
37
  %{authorized} authorized using [%{handler}] (%{unconfirmed} unconfirmed)"
56
38
  missing_header: Please, provide a header row
57
- registered: "%{registered} users have been successfully registered (%{count}
39
+ registered: "%{registered} participants have been successfully registered (%{count}
58
40
  detected, %{errors} errors) "
59
- revoked: Verification from %{revoked} users have been revoked using
41
+ revoked: Verification from %{revoked} participants have been revoked using
60
42
  [%{handler}] (%{count} detected, %{errors} errors)
61
43
  gdpr_disclaimer: Do this under your responsibility. Remember that you
62
- need to have explicit consent from your users in order to register them.
44
+ need to have explicit consent from your participants in order to register them.
63
45
  Otherwise you will be infringing the GDPR regulation in EU countries.
46
+ imports:
47
+ create:
48
+ error: There was an error importing the file
49
+ success: File successfully uploaded. We'll email you when all participants
50
+ are imported.
51
+ mailer:
52
+ authorized: "%{successful} participants have been successfully verified using
53
+ [%{handler}] (%{count} detected, %{errors} errors)"
54
+ info: "%{count} participants detected, of which %{registered} are registered,
55
+ %{authorized} authorized using [%{handler}] (%{unconfirmed} unconfirmed)"
56
+ registered: "%{successful} participants have been successfully registered (%{count}
57
+ detected, %{errors} errors) "
58
+ revoked: Verification from %{successful} participants have been revoked using
59
+ [%{handler}] (%{count} detected, %{errors} errors)
60
+ subject: File import results
61
+ new:
62
+ file: CSV file with participants data
63
+ info: Import a CSV file with a participant entry per line copying the format
64
+ from the example below
65
+ submit: Upload file
64
66
  index:
65
- authorizations: Authorized users
67
+ authorizations: Authorized participants
66
68
  stats: User stats
67
- title: Register and authorize users
69
+ title: Register and authorize participants
68
70
  new:
69
71
  authorization_handler: Verification method
70
- authorize: Authorize users
71
- check: Check users status
72
- info_html: You can <a href=%{link}>import a CSV</a> or enter the emails here, one per line. If the emails are preceded by a text, it will be interpreted as the user's name.
73
- register: Register users in the platform (if they exist they will be ignored)
74
- revoke: Revoke authorization from users
72
+ authorize: Authorize participants
73
+ check: Check participants status
74
+ info_html: You can <a href=%{link}>import a CSV</a> or enter the emails
75
+ here, one per line. If the emails are preceded by a text, it will be
76
+ interpreted as the participant's name.
77
+ register: Register participants in the platform (if they exist they will be ignored)
78
+ revoke: Revoke authorization from participants
75
79
  submit: Send and process the list
76
80
  textarea: Emails list
77
81
  stats:
@@ -10,12 +10,12 @@ es:
10
10
  admin:
11
11
  direct_verifications:
12
12
  help:
13
- - 'Permite la introducción masiva d usuarios con el fin de:'
14
- - Registrarlos directamente a la organización con el envío de invitaciones
15
- - Verificarlos en cualquier método de verificación activo
16
- - Revocar la verificación en cualquier método de verificación activo
13
+ - 'Permite la introducción masiva de participantes con el fin de:'
14
+ - Registrarlas directamente en la organización con el envío de invitaciones
15
+ - Verificarlas con cualquier método de verificación activo
16
+ - Revocar la verificación con cualquier método de verificación activo
17
17
  direct_verifications:
18
- explanation: Verificación manual por parte de los administradores de la organización
18
+ explanation: Verificación manual por parte de las administradoras de la organización
19
19
  name: Verificación directa
20
20
  direct_verifications:
21
21
  verification:
@@ -25,40 +25,54 @@ es:
25
25
  created_at: Creado el
26
26
  metadata: Metadatos
27
27
  name: Nombre
28
- title: Autorizaciones
29
- user_name: Nombre de usuario
30
28
  new_import: Nueva importación
29
+ title: Autorizaciones
30
+ user_name: Nombre de la participante
31
31
  direct_verifications:
32
32
  create:
33
- authorized: "Se han verificado correctamente %{authorized} usuarios usando [%{handler}] (%{count} detectados, %{errors} errores)"
34
- info: "Se han detectado %{count} usuarios, de los cuales %{registered} están registrados, %{authorized} autorizados usando [%{handler}] (%{unconfirmed} sin confirmar)"
35
- missing_header: Por favor, proporcionad una fila de encabezamiento
36
- registered: "Se han registrado correctamente %{registered} usuarios (%{count} detectados, %{errors} errores)"
37
- revoked: Se ha revocado correctament la verificación de %{revoked} usuarios usando [%{handler}] (%{count} detectados, %{errors} errores)
38
- gdpr_disclaimer: Haga esto bajo su responsabilidad. Recuerde que debe contar con el consentimiento explícito de sus usuarios para poder registrarlos. De lo contrario, estará infringiendo la regulación GDPR en los países de la UE.
33
+ authorized: "Se han verificado correctamente %{authorized} participantes usando [%{handler}] (%{count} detectadas, %{errors} errores)"
34
+ info: "Se han detectado %{count} participantes, de las cuales %{registered} están registradas, %{authorized} autorizadas usando [%{handler}] (%{unconfirmed} sin confirmar)"
35
+ missing_header: Por favor, proporciona una fila de encabezamiento
36
+ registered: "Se han registrado correctamente %{registered} participantes (%{count} detectadas, %{errors} errores)"
37
+ revoked: Se ha revocado correctamente la verificación de %{revoked} participantes usando [%{handler}] (%{count} detectadas, %{errors} errores)
38
+ gdpr_disclaimer: Haz esto bajo tu responsabilidad. Recuerda que debes contar con el consentimiento explícito de las participantes para poder registrarlas. De lo contrario, estarás infringiendo la regulación GDPR en los países de la UE.
39
+ imports:
40
+ create:
41
+ error: Ha habido un error al importar el archivo.
42
+ success: Se ha importado el archivo. Recibirás un email cuando todas las participantes hayan sido importadas.
43
+ mailer:
44
+ authorized: "%{successful} participantes han sido verificadas usando [%{handler}] (%{count} detectades, %{errors} errores)"
45
+ info: "%{count} participantes detectadas, de las cuales %{registered} están registradas, %{authorized} autorizadas usando [%{handler}] (%{unconfirmed} sin confirmar)"
46
+ registered: "%{successful} participantes han sido registradas (%{count} detectadas, %{errors} errores) "
47
+ revoked: Se ha revocado correctamente la verificación de %{successful} participantes usando [%{handler}] (%{count} detectadas, %{errors} errores)
48
+ subject: Resultados de la importación
49
+ new:
50
+ file: Archivo CSV con datos de participantes
51
+ info: Importa un archivo CSV con una participante por línea copiando el formato del siguiente ejemplo
52
+ submit: Subir archivo
39
53
  index:
40
- authorizations: Usuarios autorizados
41
- stats: Estadísticas de usuarios
42
- title: Inscribe y autoriza usuarios
54
+ authorizations: Participantes autorizadas
55
+ stats: Estadísticas de participantes
56
+ title: Inscribe y autoriza participantes
43
57
  new:
44
58
  authorization_handler: Método de verificación
45
- authorize: Autoriza los usuarios
46
- check: Comprueba el estado de los usuarios
47
- info: Introduce aquí los emails, uno por linea. Si los emails están precedidos por un texto, se interpretará como el nombre del usuario
48
- register: Registra los usuarios a la plataforma (si existen se ignorarán)
49
- revoke: Revoca la autorización de los usuarios
59
+ authorize: Autoriza las participantes
60
+ check: Comprueba el estado de las participantes
61
+ info_html: Puedes <a href=%{link}>importar un fichero CSV</a> o introducir aquí los emails, uno por linea. Si los emails están precedidos por un texto, éste se interpretará como el nombre de la participante
62
+ register: Registra las participantes a la plataforma (si existen se ignorarán)
63
+ revoke: Revoca la autorización de las participantes
50
64
  submit: Envía y procesa el listado
51
65
  textarea: Lista de emails
52
66
  stats:
53
67
  index:
54
- authorized: Verificados
55
- authorized_unconfirmed: Verificados pero sin confirmar
68
+ authorized: Verificadas
69
+ authorized_unconfirmed: Verificadas pero sin confirmar
56
70
  global: "- Cualquier método de verificación -"
57
- registered: Registrados
71
+ registered: Registradas
58
72
  unconfirmed: Sin confirmar
59
73
  authorizations:
60
74
  new:
61
- no_action: Este método requiere que un administrador os verifique
75
+ no_action: Este método requiere que una administradora os verifique
62
76
  verifications:
63
77
  authorizations:
64
78
  first_login:
@@ -25,16 +25,31 @@ fr:
25
25
  created_at: Créé à
26
26
  metadata: Métadonnées
27
27
  name: Nom
28
+ new_import: Nouvel import
28
29
  title: Autorisations
29
30
  user_name: Nom de l'utilisateur
30
- new_import: Nouvel import
31
31
  direct_verifications:
32
32
  create:
33
33
  authorized: "%{authorized} utilisateurs ont été vérifiés avec succès en utilisant [%{handler}] (%{count} détectés, %{errors} erreurs)"
34
34
  info: "%{count} utilisateurs détectés, dont %{registered} sont enregistrés, %{authorized} autorisés à utiliser [%{handler}] (%{unconfirmed} non confirmés)"
35
+ missing_header: Please, provide a header row
35
36
  registered: "%{registered} utilisateurs ont été enregistrés avec succès (%{count} détectés, %{errors} erreurs) "
36
37
  revoked: La vérification de %{revoked} utilisateurs ont été révoqués en utilisant [%{handler}] (%{count} détectés, %{errors} erreurs)
37
38
  gdpr_disclaimer: Faites-le sous votre responsabilité. N'oubliez pas que vous devez avoir le consentement explicite de vos utilisateurs afin de les enregistrer. Dans le cas contraire, vous enfreindrez le règlement du RGPD dans les pays de l'UE.
39
+ imports:
40
+ create:
41
+ error: There was an error importing the file
42
+ success: File successfully uploaded. We'll email you when all participants are imported.
43
+ mailer:
44
+ authorized: "%{successful} participants have been successfully verified using [%{handler}] (%{count} detected, %{errors} errors)"
45
+ info: "%{count} participants detected, of which %{registered} are registered, %{authorized} authorized using [%{handler}] (%{unconfirmed} unconfirmed)"
46
+ registered: "%{successful} participants have been successfully registered (%{count} detected, %{errors} errors) "
47
+ revoked: Verification from %{successful} participants have been revoked using [%{handler}] (%{count} detected, %{errors} errors)
48
+ subject: File import results
49
+ new:
50
+ file: CSV file with participants data
51
+ info: Import a CSV file with a participant entry per line copying the format from the example below
52
+ submit: Upload file
38
53
  index:
39
54
  authorizations: Utilisateurs autorisés
40
55
  stats: Statistiques des utilisateurs
@@ -43,7 +58,7 @@ fr:
43
58
  authorization_handler: Méthode de vérification
44
59
  authorize: Utilisateurs autorisés
45
60
  check: Vérifier le statut des utilisateurs
46
- info: Entrez les e-mails ici, un par ligne. Si les e-mails sont précédés d'un texte, il sera interprété comme le nom de l'utilisateur
61
+ info_html: You can <a href=%{link}>import a CSV</a> or enter the emails here, one per line. If the emails are preceded by a text, it will be interpreted as the participant's name.
47
62
  register: Inscrire des utilisateurs sur la plateforme (si ils existent, ils seront ignorés)
48
63
  revoke: Révoquer l'autorisation des utilisateurs
49
64
  submit: Envoyer et traiter la liste
@@ -10,9 +10,9 @@ module Decidim
10
10
 
11
11
  def header
12
12
  @header ||= begin
13
- header_row = lines[0].chomp
14
- header_row = tokenize(header_row)
15
- normalize_header(header_row)
13
+ raise InputParserError, I18n.t("#{I18N_SCOPE}.create.missing_header") if lines.count <= 1
14
+
15
+ tokenize(lines[0].chomp).map { |h| h.to_s.downcase }
16
16
  end
17
17
  end
18
18
 
@@ -25,6 +25,8 @@ module Decidim
25
25
 
26
26
  hash = {}
27
27
  header.each_with_index do |column, index|
28
+ next if column.blank?
29
+
28
30
  value = tokens[index]
29
31
  next if value&.include?(email)
30
32
 
@@ -40,14 +42,6 @@ module Decidim
40
42
  token&.strip
41
43
  end
42
44
  end
43
-
44
- def normalize_header(line)
45
- line.map do |field|
46
- raise InputParserError, I18n.t("#{I18N_SCOPE}.create.missing_header") if field.nil?
47
-
48
- field.to_sym.downcase
49
- end
50
- end
51
45
  end
52
46
  end
53
47
  end
@@ -8,7 +8,7 @@ shared_examples_for "checking users" do |params|
8
8
  perform_enqueued_jobs do
9
9
  post :create, params: params
10
10
  expect(flash[:info]).not_to be_empty
11
- expect(flash[:info]).to include("0 users detected")
11
+ expect(flash[:info]).to include("0 participants detected")
12
12
  expect(subject).to render_template("decidim/direct_verifications/verification/admin/direct_verifications/index")
13
13
  end
14
14
  end
@@ -21,7 +21,7 @@ shared_examples_for "checking users" do |params|
21
21
  perform_enqueued_jobs do
22
22
  post :create, params: params
23
23
  expect(flash[:info]).not_to be_empty
24
- expect(flash[:info]).to include("1 users detected")
24
+ expect(flash[:info]).to include("1 participants detected")
25
25
  expect(subject).to render_template("decidim/direct_verifications/verification/admin/direct_verifications/index")
26
26
  end
27
27
  end
@@ -36,7 +36,7 @@ shared_examples_for "registering users" do |params|
36
36
  expect(flash[:warning]).not_to be_empty
37
37
  expect(flash[:warning]).to include("1 detected")
38
38
  expect(flash[:warning]).to include("0 errors")
39
- expect(flash[:warning]).to include("1 users")
39
+ expect(flash[:warning]).to include("1 participants")
40
40
  expect(flash[:warning]).to include("registered")
41
41
  end
42
42
  end
@@ -51,7 +51,7 @@ shared_examples_for "authorizing users" do |params|
51
51
  expect(flash[:notice]).not_to be_empty
52
52
  expect(flash[:notice]).to include("1 detected")
53
53
  expect(flash[:notice]).to include("0 errors")
54
- expect(flash[:notice]).to include("1 users")
54
+ expect(flash[:notice]).to include("1 participants")
55
55
  expect(flash[:notice]).to include("verified")
56
56
  end
57
57
  end
@@ -75,7 +75,7 @@ shared_examples_for "revoking users" do |params|
75
75
  expect(flash[:notice]).not_to be_empty
76
76
  expect(flash[:notice]).to include("1 detected")
77
77
  expect(flash[:notice]).to include("0 errors")
78
- expect(flash[:notice]).to include("1 users")
78
+ expect(flash[:notice]).to include("1 participants")
79
79
  expect(flash[:notice]).to include("revoked")
80
80
  end
81
81
  end
@@ -16,11 +16,8 @@ module Decidim
16
16
  root to: "direct_verifications#index"
17
17
  end
18
18
 
19
- initializer "decidim_direct_verifications.admin_assets" do |app|
20
- app.config.assets.precompile += %w(
21
- direct_verifications_admin_manifest.js
22
- direct_verifications_admin_manifest.css
23
- )
19
+ initializer "decidim_notify.webpacker.assets_path" do
20
+ Decidim.register_assets_path File.expand_path("app/packs", root)
24
21
  end
25
22
  end
26
23
  end
@@ -3,8 +3,8 @@
3
3
  module Decidim
4
4
  # This holds the decidim-direct_verifications version.
5
5
  module DirectVerifications
6
- VERSION = "1.0"
7
- DECIDIM_VERSION = "0.24.3"
8
- MIN_DECIDIM_VERSION = ">= 0.23.0"
6
+ VERSION = "1.1"
7
+ DECIDIM_VERSION = "0.26.0"
8
+ MIN_DECIDIM_VERSION = ">= 0.25.0"
9
9
  end
10
10
  end
data/package.json ADDED
@@ -0,0 +1,192 @@
1
+ {
2
+ "name": "decidim-verifications-direct_verifications",
3
+ "version": "1.1.0",
4
+ "description": "A tool for Decidim that allows to track time spent by volunteers doing any arbitrary task",
5
+ "scripts": {
6
+ "lint": "eslint -c .eslintrc.json --ext .js app/packs/",
7
+ "lint-fix": "eslint -c .eslintrc.json --ext .js app/packs/ --fix",
8
+ "stylelint": "stylelint **/*.scss",
9
+ "stylelint-fix": "stylelint **/*.scss --fix"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/Platoniq/decidim-verifications-direct_verifications.git"
14
+ },
15
+ "keywords": [
16
+ "decidim"
17
+ ],
18
+ "author": "ivan@platoniq.net",
19
+ "license": "AGPL-3.0-or-later",
20
+ "bugs": {
21
+ "url": "https://github.com/Platoniq/decidim-verifications-direct_verifications/issues"
22
+ },
23
+ "homepage": "https://github.com/Platoniq/decidim-verifications-direct_verifications#readme",
24
+ "stylelint": {
25
+ "rules": {
26
+ "at-rule-empty-line-before": [
27
+ "always",
28
+ {
29
+ "except": [
30
+ "blockless-after-same-name-blockless",
31
+ "first-nested"
32
+ ],
33
+ "ignore": [
34
+ "after-comment"
35
+ ],
36
+ "ignoreAtRules": [
37
+ "else"
38
+ ]
39
+ }
40
+ ],
41
+ "at-rule-name-case": "lower",
42
+ "at-rule-semicolon-newline-after": "always",
43
+ "block-closing-brace-empty-line-before": "never",
44
+ "block-closing-brace-newline-after": "always",
45
+ "block-closing-brace-newline-before": "always-multi-line",
46
+ "block-closing-brace-space-before": "always-single-line",
47
+ "block-no-empty": true,
48
+ "block-opening-brace-newline-after": "always-multi-line",
49
+ "block-opening-brace-space-after": "always-single-line",
50
+ "block-opening-brace-space-before": "always",
51
+ "color-hex-case": "lower",
52
+ "color-hex-length": "short",
53
+ "color-no-invalid-hex": true,
54
+ "comment-empty-line-before": [
55
+ "always",
56
+ {
57
+ "except": [
58
+ "first-nested"
59
+ ],
60
+ "ignore": [
61
+ "stylelint-commands"
62
+ ]
63
+ }
64
+ ],
65
+ "comment-no-empty": true,
66
+ "comment-whitespace-inside": "always",
67
+ "custom-property-empty-line-before": [
68
+ "always",
69
+ {
70
+ "except": [
71
+ "after-custom-property",
72
+ "first-nested"
73
+ ],
74
+ "ignore": [
75
+ "after-comment",
76
+ "inside-single-line-block"
77
+ ]
78
+ }
79
+ ],
80
+ "declaration-bang-space-after": "never",
81
+ "declaration-bang-space-before": "always",
82
+ "declaration-block-no-duplicate-properties": [
83
+ true,
84
+ {
85
+ "ignore": [
86
+ "consecutive-duplicates-with-different-values"
87
+ ]
88
+ }
89
+ ],
90
+ "declaration-block-no-redundant-longhand-properties": true,
91
+ "declaration-block-no-shorthand-property-overrides": true,
92
+ "declaration-block-semicolon-newline-after": "always-multi-line",
93
+ "declaration-block-semicolon-space-after": "always-single-line",
94
+ "declaration-block-semicolon-space-before": "never",
95
+ "declaration-block-single-line-max-declarations": 1,
96
+ "declaration-block-trailing-semicolon": "always",
97
+ "declaration-colon-newline-after": "always-multi-line",
98
+ "declaration-colon-space-after": "always-single-line",
99
+ "declaration-colon-space-before": "never",
100
+ "declaration-empty-line-before": [
101
+ "always",
102
+ {
103
+ "except": [
104
+ "after-declaration",
105
+ "first-nested"
106
+ ],
107
+ "ignore": [
108
+ "after-comment",
109
+ "inside-single-line-block"
110
+ ]
111
+ }
112
+ ],
113
+ "function-calc-no-unspaced-operator": true,
114
+ "function-comma-newline-after": "always-multi-line",
115
+ "function-comma-space-after": "always-single-line",
116
+ "function-comma-space-before": "never",
117
+ "function-linear-gradient-no-nonstandard-direction": true,
118
+ "function-max-empty-lines": 0,
119
+ "function-name-case": "lower",
120
+ "function-parentheses-newline-inside": "always-multi-line",
121
+ "function-parentheses-space-inside": "never-single-line",
122
+ "function-whitespace-after": "always",
123
+ "indentation": 2,
124
+ "keyframe-declaration-no-important": true,
125
+ "length-zero-no-unit": true,
126
+ "max-empty-lines": 1,
127
+ "media-feature-colon-space-after": "always",
128
+ "media-feature-colon-space-before": "never",
129
+ "media-feature-name-case": "lower",
130
+ "media-feature-name-no-unknown": true,
131
+ "media-feature-parentheses-space-inside": "never",
132
+ "media-feature-range-operator-space-after": "always",
133
+ "media-feature-range-operator-space-before": "always",
134
+ "media-query-list-comma-newline-after": "always-multi-line",
135
+ "media-query-list-comma-space-after": "always-single-line",
136
+ "media-query-list-comma-space-before": "never",
137
+ "no-empty-source": true,
138
+ "no-eol-whitespace": true,
139
+ "no-extra-semicolons": true,
140
+ "no-invalid-double-slash-comments": true,
141
+ "no-missing-end-of-source-newline": true,
142
+ "number-leading-zero": "never",
143
+ "number-no-trailing-zeros": true,
144
+ "property-case": "lower",
145
+ "property-no-unknown": true,
146
+ "rule-empty-line-before": [
147
+ "always-multi-line",
148
+ {
149
+ "except": [
150
+ "first-nested"
151
+ ],
152
+ "ignore": [
153
+ "after-comment"
154
+ ]
155
+ }
156
+ ],
157
+ "selector-attribute-brackets-space-inside": "never",
158
+ "selector-attribute-operator-space-after": "never",
159
+ "selector-attribute-operator-space-before": "never",
160
+ "selector-combinator-space-after": "always",
161
+ "selector-combinator-space-before": "always",
162
+ "selector-descendant-combinator-no-non-space": true,
163
+ "selector-list-comma-newline-after": "always",
164
+ "selector-list-comma-space-before": "never",
165
+ "selector-max-empty-lines": 0,
166
+ "selector-pseudo-class-case": "lower",
167
+ "selector-pseudo-class-no-unknown": true,
168
+ "selector-pseudo-class-parentheses-space-inside": "never",
169
+ "selector-pseudo-element-case": "lower",
170
+ "selector-pseudo-element-colon-notation": "double",
171
+ "selector-pseudo-element-no-unknown": true,
172
+ "selector-type-case": "lower",
173
+ "selector-type-no-unknown": true,
174
+ "shorthand-property-no-redundant-values": true,
175
+ "string-no-newline": true,
176
+ "unit-case": "lower",
177
+ "unit-no-unknown": true,
178
+ "value-list-comma-newline-after": "always-multi-line",
179
+ "value-list-comma-space-after": "always-single-line",
180
+ "value-list-comma-space-before": "never",
181
+ "value-list-max-empty-lines": 0
182
+ }
183
+ },
184
+ "devDependencies": {
185
+ "eslint": "^7.32.0",
186
+ "eslint": "^7.25.0",
187
+ "eslint-config-prettier": "^8.2.0",
188
+ "eslint-config-standard": "^11.0.0",
189
+ "eslint-plugin-import": "^2.22.0",
190
+ "stylelint": "13.11.0"
191
+ }
192
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-direct_verifications
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Vergés
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.23.0
19
+ version: 0.25.0
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.23.0
26
+ version: 0.25.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.23.0
33
+ version: 0.25.0
34
34
  type: :runtime
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.23.0
40
+ version: 0.25.0
41
41
  description: Provides a verification method that also registers users directly in
42
42
  the platform. Can be used to mass verificate user with other verification handlers
43
43
  email:
@@ -49,10 +49,6 @@ files:
49
49
  - LICENSE-AGPLv3.txt
50
50
  - README.md
51
51
  - Rakefile
52
- - app/assets/config/direct_verifications_admin_manifest.css
53
- - app/assets/config/direct_verifications_admin_manifest.js
54
- - app/assets/javascripts/decidim/direct_verifications/verification/admin/direct_verifications_admin.js.es6
55
- - app/assets/stylesheets/decidim/direct_verifications/authorizations.scss
56
52
  - app/commands/decidim/direct_verifications/verification/confirm_user_authorization.rb
57
53
  - app/commands/decidim/direct_verifications/verification/create_import.rb
58
54
  - app/commands/decidim/direct_verifications/verification/destroy_user_authorization.rb
@@ -70,6 +66,10 @@ files:
70
66
  - app/jobs/decidim/direct_verifications/revoke_users_job.rb
71
67
  - app/mailers/decidim/direct_verifications/import_mailer.rb
72
68
  - app/mailers/decidim/direct_verifications/stats.rb
69
+ - app/packs/entrypoints/decidim_direct_verifications.js
70
+ - app/packs/entrypoints/decidim_direct_verifications.scss
71
+ - app/packs/src/decidim/direct_verifications/admin/checkboxes.js
72
+ - app/packs/stylesheets/decidim/direct_verifications/admin/authorizations.scss
73
73
  - app/views/decidim/direct_verifications/import_mailer/finished_processing.html.erb
74
74
  - app/views/decidim/direct_verifications/import_mailer/finished_processing.text.erb
75
75
  - app/views/decidim/direct_verifications/verification/admin/authorizations/index.html.erb
@@ -78,6 +78,7 @@ files:
78
78
  - app/views/decidim/direct_verifications/verification/admin/stats/index.html.erb
79
79
  - app/views/devise/mailer/direct_invite.html.erb
80
80
  - app/views/devise/mailer/direct_invite.text.erb
81
+ - config/assets.rb
81
82
  - config/initializers/mail_previews.rb
82
83
  - config/locales/ca.yml
83
84
  - config/locales/cs.yml
@@ -103,6 +104,7 @@ files:
103
104
  - lib/decidim/direct_verifications/verification/engine.rb
104
105
  - lib/decidim/direct_verifications/verification/workflow.rb
105
106
  - lib/decidim/direct_verifications/version.rb
107
+ - package.json
106
108
  homepage: https://github.com/Platoniq/decidim-verifications-direct_verifications
107
109
  licenses:
108
110
  - AGPL-3.0
@@ -122,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
124
  - !ruby/object:Gem::Version
123
125
  version: '0'
124
126
  requirements: []
125
- rubygems_version: 3.1.4
127
+ rubygems_version: 3.1.6
126
128
  signing_key:
127
129
  specification_version: 4
128
130
  summary: A decidim batch direct registration and verification module
@@ -1,3 +0,0 @@
1
- /*
2
- *= link decidim/direct_verifications/authorizations.css
3
- */
@@ -1 +0,0 @@
1
- //= link decidim/direct_verifications/verification/admin/direct_verifications_admin.js
@@ -1,7 +0,0 @@
1
- // = require_self
2
-
3
- $(() => {
4
- $('[type="checkbox"]#register').change(function () {
5
- $(this).closest('label').find('.callout').toggleClass('hide', !$(this).prop('checked'))
6
- })
7
- })