decidim-verifications 0.19.1 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -3
  3. data/app/cells/decidim/verifications/authorization_metadata/show.erb +13 -0
  4. data/app/cells/decidim/verifications/authorization_metadata_cell.rb +22 -0
  5. data/app/cells/decidim/verifications/revocations/show.erb +40 -0
  6. data/app/cells/decidim/verifications/revocations_cell.rb +19 -0
  7. data/app/commands/decidim/verifications/confirm_user_authorization.rb +49 -9
  8. data/app/commands/decidim/verifications/destroy_user_authorization.rb +24 -0
  9. data/app/commands/decidim/verifications/revoke_all_authorizations.rb +48 -0
  10. data/app/commands/decidim/verifications/revoke_by_condition_authorizations.rb +68 -0
  11. data/app/controllers/concerns/decidim/verifications/renewable.rb +37 -0
  12. data/app/controllers/decidim/verifications/admin/verifications_controller.rb +40 -0
  13. data/app/controllers/decidim/verifications/application_controller.rb +5 -1
  14. data/app/controllers/decidim/verifications/authorizations_controller.rb +19 -2
  15. data/app/controllers/decidim/verifications/csv_census/authorizations_controller.rb +3 -1
  16. data/app/controllers/decidim/verifications/id_documents/admin/confirmations_controller.rb +1 -1
  17. data/app/controllers/decidim/verifications/id_documents/authorizations_controller.rb +2 -0
  18. data/app/controllers/decidim/verifications/postal_letter/authorizations_controller.rb +3 -1
  19. data/app/controllers/decidim/verifications/sms/authorizations_controller.rb +3 -1
  20. data/app/forms/decidim/verifications/admin/revocations_before_date_form.rb +16 -0
  21. data/app/forms/decidim/verifications/id_documents/upload_form.rb +1 -2
  22. data/app/models/decidim/verifications/csv_census/data.rb +1 -1
  23. data/app/queries/decidim/verifications/authorizations_before_date.rb +51 -0
  24. data/app/services/decidim/authorization_handler.rb +4 -0
  25. data/app/views/decidim/verifications/authorizations/_granted_authorization.html.erb +29 -24
  26. data/app/views/decidim/verifications/authorizations/first_login.html.erb +2 -2
  27. data/app/views/decidim/verifications/authorizations/index.html.erb +22 -12
  28. data/app/views/decidim/verifications/authorizations/new.html.erb +2 -2
  29. data/app/views/decidim/verifications/authorizations/renew_modal.html.erb +38 -0
  30. data/app/views/decidim/verifications/id_documents/admin/pending_authorizations/index.html.erb +4 -4
  31. data/app/views/decidim/verifications/id_documents/authorizations/_form.html.erb +2 -0
  32. data/app/views/decidim/verifications/postal_letter/authorizations/edit.html.erb +2 -0
  33. data/app/views/decidim/verifications/postal_letter/authorizations/new.html.erb +2 -0
  34. data/app/views/decidim/verifications/sms/authorizations/edit.html.erb +2 -0
  35. data/app/views/decidim/verifications/sms/authorizations/new.html.erb +2 -0
  36. data/app/views/dummy_authorization/_form.html.erb +23 -4
  37. data/config/locales/am-ET.yml +1 -0
  38. data/config/locales/ar.yml +9 -6
  39. data/config/locales/bg-BG.yml +18 -0
  40. data/config/locales/bg.yml +18 -0
  41. data/config/locales/ca.yml +34 -2
  42. data/config/locales/cs.yml +36 -4
  43. data/config/locales/da-DK.yml +1 -0
  44. data/config/locales/da.yml +1 -0
  45. data/config/locales/de.yml +35 -2
  46. data/config/locales/el-GR.yml +1 -0
  47. data/config/locales/el.yml +259 -0
  48. data/config/locales/en.yml +34 -2
  49. data/config/locales/eo.yml +1 -0
  50. data/config/locales/es-MX.yml +34 -2
  51. data/config/locales/es-PY.yml +34 -2
  52. data/config/locales/es.yml +34 -2
  53. data/config/locales/et-EE.yml +1 -0
  54. data/config/locales/et.yml +1 -0
  55. data/config/locales/eu.yml +5 -2
  56. data/config/locales/fi-plain.yml +34 -2
  57. data/config/locales/fi.yml +44 -12
  58. data/config/locales/fr-CA.yml +260 -0
  59. data/config/locales/fr.yml +34 -2
  60. data/config/locales/ga-IE.yml +1 -0
  61. data/config/locales/gl.yml +5 -2
  62. data/config/locales/hr-HR.yml +1 -0
  63. data/config/locales/hr.yml +1 -0
  64. data/config/locales/hu.yml +26 -2
  65. data/config/locales/id-ID.yml +4 -1
  66. data/config/locales/is-IS.yml +120 -0
  67. data/config/locales/is.yml +120 -0
  68. data/config/locales/it.yml +34 -2
  69. data/config/locales/ja-JP.yml +259 -0
  70. data/config/locales/ja.yml +259 -0
  71. data/config/locales/ko-KR.yml +1 -0
  72. data/config/locales/ko.yml +1 -0
  73. data/config/locales/lt-LT.yml +1 -0
  74. data/config/locales/lt.yml +1 -0
  75. data/config/locales/lv.yml +250 -0
  76. data/config/locales/mt-MT.yml +1 -0
  77. data/config/locales/mt.yml +1 -0
  78. data/config/locales/nl.yml +34 -2
  79. data/config/locales/no.yml +196 -1
  80. data/config/locales/om-ET.yml +1 -0
  81. data/config/locales/pl.yml +91 -58
  82. data/config/locales/pt-BR.yml +6 -3
  83. data/config/locales/pt.yml +127 -94
  84. data/config/locales/ro-RO.yml +261 -0
  85. data/config/locales/ru.yml +5 -4
  86. data/config/locales/sk-SK.yml +258 -0
  87. data/config/locales/sk.yml +259 -0
  88. data/config/locales/sl.yml +5 -0
  89. data/config/locales/so-SO.yml +1 -0
  90. data/config/locales/sr-CS.yml +1 -0
  91. data/config/locales/sv.yml +34 -2
  92. data/config/locales/ti-ER.yml +1 -0
  93. data/config/locales/tr-TR.yml +5 -2
  94. data/config/locales/uk.yml +5 -4
  95. data/config/locales/vi-VN.yml +1 -0
  96. data/config/locales/vi.yml +1 -0
  97. data/config/locales/zh-CN.yml +257 -0
  98. data/config/locales/zh-TW.yml +1 -0
  99. data/lib/decidim/verifications/adapter.rb +12 -0
  100. data/lib/decidim/verifications/csv_census/engine.rb +3 -1
  101. data/lib/decidim/verifications/engine.rb +13 -0
  102. data/lib/decidim/verifications/id_documents/engine.rb +1 -0
  103. data/lib/decidim/verifications/postal_letter/engine.rb +3 -1
  104. data/lib/decidim/verifications/sms/engine.rb +3 -1
  105. data/lib/decidim/verifications/version.rb +1 -1
  106. data/lib/decidim/verifications/workflow_manifest.rb +3 -0
  107. data/lib/decidim/verifications/workflows.rb +1 -1
  108. metadata +57 -8
@@ -5,7 +5,7 @@ module Decidim
5
5
  class ApplicationController < Decidim::ApplicationController
6
6
  include NeedsPermission
7
7
 
8
- before_action :confirmed_user, only: [:new, :create]
8
+ before_action :confirmed_user, only: [:new, :create, :renew]
9
9
 
10
10
  def new
11
11
  raise NotImplementedError
@@ -15,6 +15,10 @@ module Decidim
15
15
  raise NotImplementedError
16
16
  end
17
17
 
18
+ def renew
19
+ raise NotImplementedError
20
+ end
21
+
18
22
  private
19
23
 
20
24
  def confirmed_user
@@ -4,14 +4,16 @@ module Decidim
4
4
  module Verifications
5
5
  # This controller allows users to create and destroy their authorizations. It
6
6
  # shouldn't be necessary to expand it to add new authorization schemes.
7
- class AuthorizationsController < ApplicationController
8
- helper_method :handler, :unauthorized_methods
7
+ class AuthorizationsController < Verifications::ApplicationController
8
+ helper_method :handler, :unauthorized_methods, :authorization_method, :authorization
9
9
  before_action :valid_handler, only: [:new, :create]
10
10
 
11
11
  include Decidim::UserProfile
12
+ include Decidim::Verifications::Renewable
12
13
  helper Decidim::DecidimFormHelper
13
14
  helper Decidim::CtaButtonHelper
14
15
  helper Decidim::AuthorizationFormHelper
16
+ helper Decidim::TranslationsHelper
15
17
 
16
18
  layout "layouts/decidim/user_profile", only: [:index]
17
19
 
@@ -48,6 +50,12 @@ module Decidim
48
50
 
49
51
  protected
50
52
 
53
+ def authorization_method(authorization)
54
+ return unless authorization
55
+
56
+ Decidim::Verifications::Adapter.from_element(authorization.name)
57
+ end
58
+
51
59
  def handler
52
60
  @handler ||= Decidim::AuthorizationHandler.handler_for(handler_name, handler_params)
53
61
  end
@@ -92,6 +100,15 @@ module Decidim
92
100
 
93
101
  store_location_for(:user, redirect_url)
94
102
  end
103
+
104
+ private
105
+
106
+ def authorization
107
+ @authorization ||= Decidim::Authorization.find_by(
108
+ user: current_user,
109
+ name: handler_name
110
+ )
111
+ end
95
112
  end
96
113
  end
97
114
  end
@@ -4,13 +4,15 @@ module Decidim
4
4
  module Verifications
5
5
  module CsvCensus
6
6
  class AuthorizationsController < Decidim::ApplicationController
7
+ include Decidim::Verifications::Renewable
8
+
7
9
  helper_method :authorization
8
10
 
9
11
  before_action :load_authorization
10
12
 
11
13
  def new
12
14
  @form = CensusForm.from_params(user: current_user)
13
- ConfirmCensusAuthorization.call(@authorization, @form) do
15
+ ConfirmCensusAuthorization.call(@authorization, @form, session) do
14
16
  on(:ok) do
15
17
  flash[:notice] = t("authorizations.new.success", scope: "decidim.verifications.csv_census")
16
18
  end
@@ -23,7 +23,7 @@ module Decidim
23
23
 
24
24
  @form = InformationForm.from_params(params)
25
25
 
26
- ConfirmUserAuthorization.call(@pending_authorization, @form) do
26
+ ConfirmUserAuthorization.call(@pending_authorization, @form, session) do
27
27
  on(:ok) do
28
28
  flash[:notice] = t("confirmations.create.success", scope: "decidim.verifications.id_documents.admin")
29
29
  redirect_to pending_authorizations_path
@@ -7,6 +7,8 @@ module Decidim
7
7
  # Handles verification by identity document upload
8
8
  #
9
9
  class AuthorizationsController < ApplicationController
10
+ include Decidim::Verifications::Renewable
11
+
10
12
  helper_method :authorization, :verification_type, :using_offline?, :using_online?, :available_methods
11
13
 
12
14
  before_action :load_authorization
@@ -4,6 +4,8 @@ module Decidim
4
4
  module Verifications
5
5
  module PostalLetter
6
6
  class AuthorizationsController < ApplicationController
7
+ include Decidim::Verifications::Renewable
8
+
7
9
  helper_method :authorization
8
10
 
9
11
  before_action :load_authorization
@@ -43,7 +45,7 @@ module Decidim
43
45
 
44
46
  @form = ConfirmationForm.from_params(params)
45
47
 
46
- ConfirmUserAuthorization.call(@authorization, @form) do
48
+ ConfirmUserAuthorization.call(@authorization, @form, session) do
47
49
  on(:ok) do
48
50
  flash[:notice] = t("authorizations.update.success", scope: "decidim.verifications.postal_letter")
49
51
  redirect_to decidim_verifications.authorizations_path
@@ -4,6 +4,8 @@ module Decidim
4
4
  module Verifications
5
5
  module Sms
6
6
  class AuthorizationsController < ApplicationController
7
+ include Decidim::Verifications::Renewable
8
+
7
9
  helper_method :authorization
8
10
 
9
11
  def new
@@ -41,7 +43,7 @@ module Decidim
41
43
 
42
44
  @form = ConfirmationForm.from_params(params)
43
45
 
44
- ConfirmUserAuthorization.call(authorization, @form) do
46
+ ConfirmUserAuthorization.call(authorization, @form, session) do
45
47
  on(:ok) do
46
48
  flash[:notice] = t("authorizations.update.success", scope: "decidim.verifications.sms")
47
49
 
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Verifications
5
+ module Admin
6
+ class RevocationsBeforeDateForm < Decidim::Form
7
+ include TranslatableAttributes
8
+
9
+ attribute :impersonated_only, Boolean
10
+ attribute :before_date, Decidim::Attributes::LocalizedDate
11
+
12
+ validates :before_date, presence: true
13
+ end
14
+ end
15
+ end
16
+ end
@@ -11,8 +11,7 @@ module Decidim
11
11
  attribute :verification_attachment, String
12
12
 
13
13
  validates :verification_attachment,
14
- file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } },
15
- file_content_type: { allow: ["image/jpeg", "image/png"] },
14
+ passthru: { to: Decidim::Authorization },
16
15
  presence: true,
17
16
  if: :uses_online_method?
18
17
  end
@@ -29,7 +29,7 @@ module Decidim
29
29
 
30
30
  def process_row(row)
31
31
  user_mail = row.first
32
- if user_mail.present? && user_mail.match?(Devise.email_regexp)
32
+ if user_mail.present? && user_mail.match?(::Devise.email_regexp)
33
33
  values << user_mail
34
34
  else
35
35
  errors << row
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Verifications
5
+ # Finds authorizations by different criteria
6
+ class AuthorizationsBeforeDate < Rectify::Query
7
+ # Initializes the class.
8
+ #
9
+ # @param organization [Organization] The organization where this authorization belongs to
10
+ # @param date [Date] The verification's date of an authorization
11
+ # @param granted [boolean] Whether return granted auths only or not granted only
12
+ # @param impersonated_only [boolean] Whether return impersonated auths only
13
+ def initialize(organization:, date:, granted: true, impersonated_only: false)
14
+ @organization = organization
15
+ @date = date
16
+ @granted = granted
17
+ @impersonated_only = impersonated_only
18
+ end
19
+
20
+ # Finds the Authorizations for the given method
21
+ #
22
+ # Returns an ActiveRecord::Relation.
23
+ def query
24
+ return Decidim::Authorization.none unless organization
25
+
26
+ query = Decidim::Authorization.left_outer_joins(:organization).where(decidim_organizations: { id: organization.id })
27
+
28
+ if impersonated_only
29
+ query = query
30
+ .left_outer_joins(:user)
31
+ .where(decidim_users: { decidim_organization_id: organization.id })
32
+ .where(decidim_users: { managed: true })
33
+ end
34
+
35
+ query = query.where("#{Decidim::Authorization.table_name}.created_at < ?", date) unless date.nil?
36
+
37
+ query = if granted
38
+ query.where.not(granted_at: nil)
39
+ else
40
+ query.where(granted_at: nil)
41
+ end
42
+
43
+ query
44
+ end
45
+
46
+ private
47
+
48
+ attr_reader :organization, :date, :granted, :impersonated_only
49
+ end
50
+ end
51
+ end
@@ -56,6 +56,10 @@ module Decidim
56
56
  # params the user sent with the authorization form want to be persisted for
57
57
  # future use.
58
58
  #
59
+ # As a convention, an 'extras' key can be used to store information not
60
+ # directly related with authorization. Thus, when rendering previous
61
+ # verification data, on renewal, 'extras' is not rendered to the user.
62
+ #
59
63
  # Returns a Hash.
60
64
  def metadata
61
65
  {}
@@ -1,27 +1,32 @@
1
- <div class="card--list__item">
2
- <div class="card--list__text">
3
- <%= icon "lock-locked", class: "card--list__icon" %>
4
- <div>
5
- <h5 class="card--list__heading">
6
- <%= t("#{authorization.name}.name", scope: "decidim.authorization_handlers") %>
7
- </h5>
8
- <span class="text-small">
9
- <% if authorization.expired? %>
10
- <%= t("expired_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.expires_at, format: :long)) %>
11
- <% else %>
12
- <%= t("granted_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.granted_at, format: :long)) %>
13
- <% if authorization.expires_at.present? %>
14
- <%= t("expires_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.expires_at, format: :long)) %>
15
- <% end %>
1
+ <div class="card--list__text">
2
+ <%= icon "lock-locked", class: "card--list__icon", role: "img", "aria-hidden": true %>
3
+ <div>
4
+ <h5 class="card--list__heading">
5
+ <%= t("#{authorization.name}.name", scope: "decidim.authorization_handlers") %>
6
+ </h5>
7
+ <span class="text-small <%= "alert" if authorization.expired? %>">
8
+ <% if authorization.expired? %>
9
+ <%= t("expired_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.expires_at, format: :long)) %>
10
+ <% else %>
11
+ <%= t("granted_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.granted_at, format: :long)) %>
12
+ <% if authorization.expires_at.present? %>
13
+ <%= t("expires_at", scope: "decidim.authorization_handlers", timestamp: l(authorization.expires_at, format: :long)) %>
16
14
  <% end %>
17
- </span>
18
- </div>
15
+ <% end %>
16
+ </span>
19
17
  </div>
20
- <% if authorization.expired? %>
21
- <div class="card--list__data">
22
- <span class="card--list__data__icon">
23
- <%= icon "reload" %>
24
- </span>
25
- </div>
26
- <% end %>
27
18
  </div>
19
+
20
+ <% if authorization.expired? %>
21
+ <div class="card--list__data">
22
+ <span class="card--list__data__icon">
23
+ <%= icon "reload", aria_label: t("renew", scope: "decidim.authorization_handlers"), role: "img" %>
24
+ </span>
25
+ </div>
26
+ <% elsif authorization.renewable? %>
27
+ <div class="card--list__data">
28
+ <span class="card--list__data__icon">
29
+ <%= icon "reload", aria_label: t("renew", scope: "decidim.authorization_handlers"), role: "img" %>
30
+ </span>
31
+ </div>
32
+ <% end %>
@@ -1,4 +1,4 @@
1
- <main class="wrapper">
1
+ <div class="wrapper">
2
2
  <div class="row collapse">
3
3
  <div class="row collapse">
4
4
  <div class="columns large-8 large-centered text-center">
@@ -19,4 +19,4 @@
19
19
  </div>
20
20
  </div>
21
21
  </div>
22
- </main>
22
+ </div>
@@ -1,28 +1,38 @@
1
+ <% add_decidim_page_title(t("authorizations", scope: "layouts.decidim.user_profile")) %>
2
+ <% content_for(:subtitle) { t("authorizations", scope: "layouts.decidim.user_profile") } %>
3
+ <% url_params = (redirect_url.present? ? { redirect_url: redirect_url } : {}) %>
4
+
1
5
  <div class="row column authorizations-list">
2
6
  <section class="section">
3
7
  <% if @granted_authorizations.any? %>
4
8
  <div class="card card--list">
5
9
  <% @granted_authorizations.each do |authorization| %>
6
10
  <% if authorization.expired? %>
7
- <% authorization_method = Decidim::Verifications::Adapter.from_element(authorization.name) %>
8
- <%= link_to authorization_method.root_path do %>
11
+ <%= link_to authorization_method(authorization).root_path(url_params), title: t(".expired_verification"), class: "card--list__item" do %>
9
12
  <% render partial: "granted_authorization", locals: { authorization: authorization } %>
10
13
  <% end %>
14
+ <% elsif authorization.renewable? %>
15
+ <%= link_to "#", title: t(".show_renew_info"), data: { open: "renew-modal", "open-url": renew_modal_authorizations_path(handler: authorization.name) }, class: "card--list__item authorization-renewable" do %>
16
+ <%= render partial: "granted_authorization", locals: { authorization: authorization } %>
17
+ <% end %>
11
18
  <% else %>
12
- <%= render partial: "granted_authorization", locals: { authorization: authorization } %>
19
+ <div class="card--list__item">
20
+ <%= render partial: "granted_authorization", locals: { authorization: authorization } %>
21
+ </div>
13
22
  <% end %>
14
23
  <% end %>
15
24
  </div>
25
+
26
+ <div id="renew-modal" data-reveal class="reveal" aria-labelledby="<%= t("renew_modal.title", scope: "decidim.verifications.authorizations") %>" aria-hidden="true" role="dialog"></div>
16
27
  <% end %>
17
28
 
18
29
  <% if @pending_authorizations.any? %>
19
30
  <div class="card card--list">
20
31
  <% @pending_authorizations.each do |authorization| %>
21
- <% authorization_method = Decidim::Verifications::Adapter.from_element(authorization.name) %>
22
- <%= link_to authorization_method.resume_authorization_path do %>
32
+ <%= link_to authorization_method(authorization).resume_authorization_path(url_params) do %>
23
33
  <div class="card--list__item">
24
34
  <div class="card--list__text">
25
- <%= icon "reload", class: "card--list__icon" %>
35
+ <%= icon "reload", class: "card--list__icon", aria_label: t(".pending_verification"), role: "img" %>
26
36
  <div>
27
37
  <h5 class="card--list__heading">
28
38
  <%= t("#{authorization.name}.name", scope: "decidim.authorization_handlers") %>
@@ -32,9 +42,9 @@
32
42
  </span>
33
43
  </div>
34
44
  </div>
35
- <div class="card--list__data">
45
+ <div class="card--list__data" aria-hidden="true">
36
46
  <span class="card--list__data__icon">
37
- <%= icon "chevron-right" %>
47
+ <%= icon "chevron-right", role: "img", "aria-hidden": true %>
38
48
  </span>
39
49
  </div>
40
50
  </div>
@@ -46,10 +56,10 @@
46
56
  <% if unauthorized_methods.any? %>
47
57
  <div class="card card--list">
48
58
  <% unauthorized_methods.each do |unauthorized_method| %>
49
- <%= link_to unauthorized_method.root_path do %>
59
+ <%= link_to unauthorized_method.root_path(url_params) do %>
50
60
  <div class="card--list__item">
51
61
  <div class="card--list__text">
52
- <%= icon "lock-unlocked", class: "card--list__icon" %>
62
+ <%= icon "lock-unlocked", class: "card--list__icon", aria_label: t(".unauthorized_verification"), role: "img" %>
53
63
  <div>
54
64
  <h5 class="card--list__heading">
55
65
  <%= t("#{unauthorized_method.key}.name", scope: "decidim.authorization_handlers") %>
@@ -59,9 +69,9 @@
59
69
  </span>
60
70
  </div>
61
71
  </div>
62
- <div class="card--list__data">
72
+ <div class="card--list__data" aria-hidden="true">
63
73
  <span class="card--list__data__icon">
64
- <%= icon "chevron-right" %>
74
+ <%= icon "chevron-right", role: "img", "aria-hidden": true %>
65
75
  </span>
66
76
  </div>
67
77
  </div>
@@ -1,4 +1,4 @@
1
- <main class="wrapper">
1
+ <div class="wrapper">
2
2
  <div class="row collapse">
3
3
  <div class="row collapse">
4
4
  <div class="columns large-8 large-centered text-center page-title">
@@ -29,4 +29,4 @@
29
29
  </div>
30
30
  </div>
31
31
  </div>
32
- </main>
32
+ </div>
@@ -0,0 +1,38 @@
1
+ <div class="reveal__header">
2
+ <h3 class="reveal__title">
3
+ <%= t("renew_modal.title", scope: "decidim.verifications.authorizations") %>
4
+ </h3>
5
+
6
+ <button class="close-button" data-close aria-label="<%= t("renew_modal.close", scope: "decidim.verifications.authorizations") %>"
7
+ type="button">
8
+ <span aria-hidden="true">&times;</span>
9
+ </button>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <p>
14
+ <strong>
15
+ <%= t("#{authorization.name}.name", scope: "decidim.authorization_handlers") %>
16
+ </strong>
17
+ <br>
18
+ <span class="text-muted">
19
+ <%= t("#{authorization.name}.explanation", scope: "decidim.authorization_handlers") %>
20
+ </span>
21
+ </p>
22
+
23
+ <%= cell(authorization.metadata_cell, authorization) %>
24
+
25
+ <p>
26
+ <%= t("renew_modal.info_renew", scope: "decidim.verifications.authorizations") %>
27
+ </p>
28
+ </div>
29
+
30
+ <div class="row">
31
+ <div class="column flex-center">
32
+ <button class="clear button secondary expanded" data-close type="button">
33
+ <%= t("renew_modal.cancel", scope: "decidim.verifications.authorizations") %>
34
+ </button>
35
+
36
+ <%= link_to t("renew_modal.continue", scope: "decidim.verifications.authorizations"), authorization_method(authorization).renew_path, class: "button expanded" %>
37
+ </div>
38
+ </div>
@@ -15,8 +15,8 @@
15
15
  </tr>
16
16
  </thead>
17
17
  <tbody>
18
- <tr>
19
- <% @pending_online_authorizations.each do |authorization| %>
18
+ <% @pending_online_authorizations.each do |authorization| %>
19
+ <tr>
20
20
  <td>
21
21
  <%= link_to t(".verification_number", n: authorization.id),
22
22
  new_pending_authorization_confirmation_path(authorization.id) %>
@@ -26,8 +26,8 @@
26
26
  <%= image_tag authorization.verification_attachment.url(:thumbnail), class: "thumbnail-list" %>
27
27
  <% end %>
28
28
  </td>
29
- <% end %>
30
- </tr>
29
+ </tr>
30
+ <% end %>
31
31
  </tbody>
32
32
  </table>
33
33
  </div>