decidim-admin 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-admin might be problematic. Click here for more details.

Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/admin/form.js.es6 +24 -8
  3. data/app/assets/stylesheets/decidim/admin/modules/_forms.scss +8 -0
  4. data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +1 -0
  5. data/app/commands/decidim/admin/create_component.rb +4 -7
  6. data/app/commands/decidim/admin/create_participatory_space_private_user.rb +4 -2
  7. data/app/commands/decidim/admin/destroy_newsletter.rb +1 -0
  8. data/app/commands/decidim/admin/process_participatory_space_private_user_import_csv.rb +41 -0
  9. data/app/commands/decidim/admin/process_user_group_verification_csv.rb +1 -0
  10. data/app/commands/decidim/admin/reject_user_group.rb +1 -0
  11. data/app/commands/decidim/admin/remove_admin.rb +1 -1
  12. data/app/commands/decidim/admin/update_component_permissions.rb +1 -1
  13. data/app/commands/decidim/admin/update_organization.rb +1 -0
  14. data/app/commands/decidim/admin/verify_user_group.rb +1 -0
  15. data/app/controllers/decidim/admin/areas_controller.rb +1 -0
  16. data/app/controllers/decidim/admin/components_controller.rb +29 -5
  17. data/app/controllers/decidim/admin/concerns/has_private_users_csv_import.rb +58 -0
  18. data/app/controllers/decidim/admin/impersonations_controller.rb +19 -2
  19. data/app/controllers/decidim/admin/resource_permissions_controller.rb +4 -1
  20. data/app/controllers/decidim/admin/scopes_controller.rb +2 -0
  21. data/app/forms/decidim/admin/component_form.rb +41 -16
  22. data/app/forms/decidim/admin/managed_user_promotion_form.rb +1 -0
  23. data/app/forms/decidim/admin/participatory_space_private_user_csv_import_form.rb +13 -0
  24. data/app/forms/decidim/admin/selective_newsletter_form.rb +1 -0
  25. data/app/helpers/decidim/admin/application_helper.rb +1 -1
  26. data/app/helpers/decidim/admin/attributes_display_helper.rb +2 -0
  27. data/app/helpers/decidim/admin/newsletters_helper.rb +6 -0
  28. data/app/helpers/decidim/admin/resource_permissions_helper.rb +1 -1
  29. data/app/helpers/decidim/admin/settings_helper.rb +52 -10
  30. data/app/jobs/decidim/admin/expire_impersonation_job.rb +1 -0
  31. data/app/jobs/decidim/admin/import_participatory_space_private_user_csv_job.rb +27 -0
  32. data/app/jobs/decidim/admin/newsletter_job.rb +1 -0
  33. data/app/jobs/decidim/admin/verify_user_group_from_csv_job.rb +1 -0
  34. data/app/permissions/decidim/admin/permissions.rb +4 -0
  35. data/app/permissions/decidim/admin/user_manager_permissions.rb +2 -0
  36. data/app/queries/decidim/admin/newsletter_recipients.rb +3 -0
  37. data/app/queries/decidim/admin/user_filter.rb +1 -0
  38. data/app/queries/decidim/admin/user_groups_evaluation.rb +1 -0
  39. data/app/views/decidim/admin/attachment_collections/index.html.erb +1 -1
  40. data/app/views/decidim/admin/attachment_collections/show.html.erb +1 -1
  41. data/app/views/decidim/admin/attachments/index.html.erb +1 -1
  42. data/app/views/decidim/admin/attachments/show.html.erb +1 -1
  43. data/app/views/decidim/admin/categories/index.html.erb +2 -2
  44. data/app/views/decidim/admin/categories/show.html.erb +1 -1
  45. data/app/views/decidim/admin/components/_form.html.erb +6 -6
  46. data/app/views/decidim/admin/components/_settings_fields.html.erb +6 -5
  47. data/app/views/decidim/admin/impersonations/_form.html.erb +1 -3
  48. data/app/views/decidim/admin/newsletters/select_recipients_to_deliver.html.erb +1 -1
  49. data/app/views/decidim/admin/organization_appearance/_form.html.erb +0 -7
  50. data/app/views/decidim/admin/participatory_space_private_users/index.html.erb +4 -3
  51. data/app/views/decidim/admin/participatory_space_private_users_csv_imports/new.html.erb +19 -0
  52. data/app/views/decidim/admin/resource_permissions/edit.html.erb +1 -1
  53. data/app/views/decidim/admin/static_pages/_topic.html.erb +1 -1
  54. data/app/views/decidim/admin/static_pages/show.html.erb +1 -1
  55. data/app/views/layouts/decidim/admin/_application.html.erb +6 -6
  56. data/app/views/layouts/decidim/admin/_header.html.erb +1 -1
  57. data/config/locales/ar.yml +7 -1
  58. data/config/locales/ca.yml +23 -11
  59. data/config/locales/cs.yml +13 -2
  60. data/config/locales/de.yml +9 -0
  61. data/config/locales/en.yml +14 -2
  62. data/config/locales/es-MX.yml +13 -2
  63. data/config/locales/es-PY.yml +13 -2
  64. data/config/locales/es.yml +13 -1
  65. data/config/locales/fi-plain.yml +13 -2
  66. data/config/locales/fi.yml +14 -2
  67. data/config/locales/fr.yml +13 -2
  68. data/config/locales/hu.yml +13 -1
  69. data/config/locales/it.yml +12 -2
  70. data/config/locales/nl.yml +13 -1
  71. data/config/locales/sv.yml +0 -1
  72. data/config/locales/tr-TR.yml +0 -2
  73. data/lib/decidim/admin/test/manage_attachments_examples.rb +1 -1
  74. data/lib/decidim/admin/version.rb +1 -1
  75. metadata +14 -9
@@ -17,6 +17,7 @@ module Decidim
17
17
  organization: context.current_organization,
18
18
  email: email
19
19
  ).where.not(id: context.current_user.id).empty?
20
+
20
21
  errors.add :email, :taken
21
22
  false
22
23
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Admin
5
+ # A form object used to upload CSV to batch participatory space private users.
6
+ #
7
+ class ParticipatorySpacePrivateUserCsvImportForm < Form
8
+ attribute :file
9
+
10
+ validates :file, presence: true
11
+ end
12
+ end
13
+ end
@@ -28,6 +28,7 @@ module Decidim
28
28
 
29
29
  def at_least_one_participatory_space_selected
30
30
  return if send_to_all_users && current_user.admin?
31
+
31
32
  errors.add(:base, "Select atleast one participatory space") if spaces_selected.blank?
32
33
  end
33
34
 
@@ -25,7 +25,7 @@ module Decidim
25
25
  # Returns a String with a link wrapped in a <li> element.
26
26
  def public_page_link(url)
27
27
  content_tag(:li) do
28
- link_to url, class: "button", style: "color: #fff", target: "_blank" do
28
+ link_to url, class: "button", style: "color: #fff", target: "_blank", rel: "noopener" do
29
29
  I18n.t("decidim.admin.view_public_page")
30
30
  end
31
31
  end
@@ -52,6 +52,7 @@ module Decidim
52
52
  # Holds the logic to render a label for a given attribute.
53
53
  def display_label(record, attr, locale = nil)
54
54
  return content_tag(:dt, record.class.human_attribute_name(attr)) unless locale
55
+
55
56
  content_tag(:dt, record.class.human_attribute_name(attr) + " (#{locale})")
56
57
  end
57
58
 
@@ -70,6 +71,7 @@ module Decidim
70
71
 
71
72
  def display_available_locales(record)
72
73
  return record.available_locales if record.respond_to?(:available_locales)
74
+
73
75
  record.organization.available_locales if record.respond_to?(:organization)
74
76
  current_organization.available_locales if respond_to?(:current_organization)
75
77
  end
@@ -14,6 +14,7 @@ module Decidim
14
14
 
15
15
  def participatory_space_types_form_object(form_object, space_type)
16
16
  return if spaces_user_can_admin[space_type.manifest_name.to_sym].blank?
17
+
17
18
  html = ""
18
19
  form_object.fields_for "participatory_space_types[#{space_type.manifest_name}]", space_type do |ff|
19
20
  html += ff.hidden_field :manifest_name, value: space_type.manifest_name
@@ -24,6 +25,7 @@ module Decidim
24
25
 
25
26
  def select_tag_participatory_spaces(manifest_name, spaces, child_form)
26
27
  return unless spaces
28
+
27
29
  content_tag :div, class: "#{manifest_name}-block spaces-block-tag cell small-12 medium-6" do
28
30
  child_form.select :ids, options_for_select(spaces),
29
31
  { prompt: t("select_recipients_to_deliver.none", scope: "decidim.admin.newsletters"),
@@ -43,6 +45,7 @@ module Decidim
43
45
  def selective_newsletter_to(newsletter)
44
46
  return content_tag(:strong, t("index.not_sent", scope: "decidim.admin.newsletters"), class: "text-warning") unless newsletter.sent?
45
47
  return content_tag(:strong, t("index.all_users", scope: "decidim.admin.newsletters"), class: "text-success") if newsletter.sent? && newsletter.extended_data.blank?
48
+
46
49
  content_tag :div do
47
50
  concat sent_to_users newsletter
48
51
  concat sent_to_spaces newsletter
@@ -64,6 +67,7 @@ module Decidim
64
67
  html = "<p style='margin-bottom:0;'> "
65
68
  newsletter.sended_to_partipatory_spaces.try(:each) do |type|
66
69
  next if type["ids"].blank?
70
+
67
71
  html += t("index.segmented_to", scope: "decidim.admin.newsletters", subject: t("activerecord.models.decidim/#{type["manifest_name"].singularize}.other"))
68
72
  if type["ids"].include?("all")
69
73
  html += "<strong> #{t("index.all", scope: "decidim.admin.newsletters")} </strong>"
@@ -106,6 +110,7 @@ module Decidim
106
110
  Decidim.participatory_space_manifests.each do |manifest|
107
111
  organization_participatory_space(manifest.name)&.each do |space|
108
112
  next unless space.admins.exists?(id: current_user.id)
113
+
109
114
  @spaces_user_can_admin[manifest.name] ||= []
110
115
  space_as_option_for_select_data = space_as_option_for_select(space)
111
116
  @spaces_user_can_admin[manifest.name] << space_as_option_for_select_data unless @spaces_user_can_admin[manifest.name].detect do |x|
@@ -118,6 +123,7 @@ module Decidim
118
123
 
119
124
  def space_as_option_for_select(space)
120
125
  return unless space
126
+
121
127
  [
122
128
  translated_attribute(space.title),
123
129
  space.id,
@@ -29,7 +29,7 @@ module Decidim
29
29
  return unless resource.allow_resource_permissions? && allowed_to?(:update, resource_key, resource_key => resource)
30
30
 
31
31
  icon_link_to "key",
32
- send("edit_#{resource_key}_permissions_path", resource.id, resource_name: resource.resource_manifest.name),
32
+ send("edit_#{resource_key}_permissions_path", resource, resource_name: resource.resource_manifest.name),
33
33
  t("actions.permissions", scope: "decidim.admin"),
34
34
  class: "action-icon--permissions #{"action-icon--highlighted" if resource.permissions.present?}"
35
35
  end
@@ -23,36 +23,78 @@ module Decidim
23
23
  #
24
24
  # Returns a rendered form field.
25
25
  def settings_attribute_input(form, attribute, name, options = {})
26
- if attribute.translated?
26
+ if name == :amendments_visibility
27
+ amendments_visibility_form_field(form, options)
28
+ elsif attribute.translated?
27
29
  form.send(:translated, form_method_for_attribute(attribute), name, options.merge(tabs_id: "#{options[:tabs_prefix]}-#{name}-tabs"))
28
30
  else
29
31
  form.send(form_method_for_attribute(attribute), name, options.merge(extra_options_for(name)))
30
32
  end
31
33
  end
32
34
 
35
+ # Returns a translation or nil. If nil, ZURB Foundation won't add the help_text.
36
+ def help_text_for_component_setting(field_name, settings_name, component_name)
37
+ key = "decidim.components.#{component_name}.settings.#{settings_name}.#{field_name}_help"
38
+ return t(key) if I18n.exists?(key)
39
+ end
40
+
33
41
  private
34
42
 
43
+ # Returns a radio buttons collection input for the component's step setting
44
+ # :amendments_visibility; all wrap in a label tag and with help text.
45
+ def amendments_visibility_form_field(form, options)
46
+ html = label_tag(:amendments_visibility) do
47
+ concat options[:label]
48
+ concat tag(:br)
49
+ concat form.collection_radio_buttons(:amendments_visibility,
50
+ Decidim::Amendment::VisibilityStepSetting.options,
51
+ :last,
52
+ :first,
53
+ { checked: form.object.amendments_visibility },
54
+ amendments_extra_options) { |b| b.label { b.radio_button + b.text } }
55
+ end
56
+ html << content_tag(:p, help_text_for_component_setting(:amendments_visibility, :step, :proposals), class: "help-text")
57
+ html.html_safe
58
+ end
59
+
35
60
  def form_method_for_attribute(attribute)
36
61
  return :editor if attribute.type.to_sym == :text && attribute.editor?
62
+
37
63
  TYPES[attribute.type.to_sym]
38
64
  end
39
65
 
40
- # Marks :participatory_texts_enabled checkbox with a unique class if
41
- # the Proposals component has existing proposals, and stores the help text
42
- # that will be added in a new div via JavaScript in "decidim/admin/form".
43
- #
44
- # field_name - The name of the field to disable.
45
- #
66
+ # Handles special cases.
46
67
  # Returns an empty Hash or a Hash with extra HTML options.
47
68
  def extra_options_for(field_name)
48
- return {} unless field_name == :participatory_texts_enabled &&
49
- Decidim::Proposals::Proposal.where(component: @component).any?
69
+ case field_name
70
+ when :participatory_texts_enabled
71
+ participatory_texts_extra_options
72
+ when :amendment_creation_enabled,
73
+ :amendment_reaction_enabled,
74
+ :amendment_promotion_enabled
75
+ amendments_extra_options
76
+ else
77
+ {}
78
+ end
79
+ end
80
+
81
+ # Marks :participatory_texts_enabled setting with a CSS class if the
82
+ # Proposals component has existing proposals, so it can be identified
83
+ # in "decidim/admin/form.js". Also, adds a help_text.
84
+ def participatory_texts_extra_options
85
+ return {} unless Decidim::Proposals::Proposal.where(component: @component).any?
50
86
 
51
87
  {
52
88
  class: "participatory_texts_disabled",
53
- data: { text: t("decidim.admin.components.form.participatory_texts_enabled_help") }
89
+ help_text: help_text_for_component_setting(:participatory_texts_disabled, :global, :proposals)
54
90
  }
55
91
  end
92
+
93
+ # Marks component_step_settings related to amendments with a CSS class,
94
+ # so they can be identified in "decidim/admin/form.js".
95
+ def amendments_extra_options
96
+ { class: "amendments_step_settings" }
97
+ end
56
98
  end
57
99
  end
58
100
  end
@@ -8,6 +8,7 @@ module Decidim
8
8
  def perform(user, current_user)
9
9
  impersonation_log = Decidim::ImpersonationLog.where(admin: current_user, user: user).active.first
10
10
  return unless impersonation_log
11
+
11
12
  impersonation_log.expired_at = Time.current
12
13
  impersonation_log.save!
13
14
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Admin
5
+ # Custom ApplicationJob scoped to the admin panel.
6
+ #
7
+ class ImportParticipatorySpacePrivateUserCsvJob < ApplicationJob
8
+ queue_as :default
9
+
10
+ def perform(email, user_name, privatable_to, current_user)
11
+ return if email.blank? || user_name.blank?
12
+
13
+ params = {
14
+ name: user_name,
15
+ email: email.downcase.strip
16
+ }
17
+ private_user_form = ParticipatorySpacePrivateUserForm.from_params(params, privatable_to: privatable_to)
18
+ .with_context(
19
+ current_user: current_user,
20
+ current_particiaptory_space: privatable_to
21
+ )
22
+
23
+ Decidim::Admin::CreateParticipatorySpacePrivateUser.call(private_user_form, current_user, privatable_to, true)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -14,6 +14,7 @@ module Decidim
14
14
 
15
15
  @newsletter.with_lock do
16
16
  raise "Newsletter already sent" if @newsletter.sent?
17
+
17
18
  @newsletter.update!(
18
19
  sent_at: Time.current,
19
20
  extended_data: extended_data,
@@ -13,6 +13,7 @@ module Decidim
13
13
 
14
14
  return if email.blank?
15
15
  return unless user_group
16
+
16
17
  Decidim::Admin::VerifyUserGroup.call(user_group, verifier, true)
17
18
  end
18
19
 
@@ -61,6 +61,7 @@ module Decidim
61
61
  permission_action.action == :read
62
62
 
63
63
  return user_manager_permissions if user_manager?
64
+
64
65
  toggle_allow(user.admin? || space_allows_admin_access_to_current_action?)
65
66
  end
66
67
 
@@ -68,6 +69,7 @@ module Decidim
68
69
  return unless permission_action.subject == :newsletter
69
70
  return allow! if user.admin?
70
71
  return unless space_allows_admin_access?
72
+
71
73
  newsletter = context.fetch(:newsletter, nil)
72
74
 
73
75
  case permission_action.action
@@ -94,6 +96,7 @@ module Decidim
94
96
 
95
97
  def static_page_action?
96
98
  return unless permission_action.subject == :static_page
99
+
97
100
  static_page = context.fetch(:static_page, nil)
98
101
 
99
102
  case permission_action.action
@@ -132,6 +135,7 @@ module Decidim
132
135
 
133
136
  def user_action?
134
137
  return unless [:user, :impersonatable_user].include?(permission_action.subject)
138
+
135
139
  subject_user = context.fetch(:user, nil)
136
140
 
137
141
  case permission_action.action
@@ -5,6 +5,7 @@ module Decidim
5
5
  class UserManagerPermissions < Decidim::DefaultPermissions
6
6
  def permissions
7
7
  return permission_action unless user_manager? || user.admin?
8
+
8
9
  allow! if read_admin_dashboard_action?
9
10
 
10
11
  allow! if managed_user_action?
@@ -37,6 +38,7 @@ module Decidim
37
38
 
38
39
  def user_action?
39
40
  return unless [:user, :impersonatable_user].include?(permission_action.subject)
41
+
40
42
  subject_user = context.fetch(:user, nil)
41
43
 
42
44
  case permission_action.action
@@ -41,6 +41,7 @@ module Decidim
41
41
 
42
42
  @form.participatory_space_types.map do |type|
43
43
  next if type.ids.blank?
44
+
44
45
  object_class = "Decidim::#{type.manifest_name.classify}"
45
46
  if type.ids.include?("all")
46
47
  object_class.constantize.where(organization: @organization)
@@ -55,6 +56,7 @@ module Decidim
55
56
  def user_id_of_followers
56
57
  return if spaces.blank?
57
58
  return unless @form.send_to_followers
59
+
58
60
  Decidim::Follow.user_follower_ids_for_participatory_spaces(spaces)
59
61
  end
60
62
 
@@ -74,6 +76,7 @@ module Decidim
74
76
  end
75
77
  end
76
78
  next unless defined?(Decidim::Comments)
79
+
77
80
  Decidim::Comments.newsletter_participant_entities.flatten.each do |object|
78
81
  klass = Object.const_get(object)
79
82
  participant_ids << klass.newsletter_participant_ids(space)
@@ -46,6 +46,7 @@ module Decidim
46
46
 
47
47
  def filter_by_search(users)
48
48
  return users if name_query.blank?
49
+
49
50
  users.where("LOWER(name) LIKE LOWER(?)", "%#{name_query}%")
50
51
  end
51
52
 
@@ -35,6 +35,7 @@ module Decidim
35
35
 
36
36
  def filter_by_search(user_groups)
37
37
  return user_groups if @query.blank?
38
+
38
39
  user_groups.where("LOWER(name) LIKE LOWER(?)", "%#{@query}%")
39
40
  end
40
41
 
@@ -22,7 +22,7 @@
22
22
  <% collection_for.attachment_collections.each do |attachment_collection| %>
23
23
  <tr data-id="<%= attachment_collection.id %>">
24
24
  <td>
25
- <%= link_to translated_attribute(attachment_collection.name), edit_polymorphic_path([collection_for, attachment_collection]) %><br />
25
+ <%= link_to translated_attribute(attachment_collection.name), edit_polymorphic_path([collection_for, attachment_collection]) %><br>
26
26
  </td>
27
27
  <td class="table-list__actions">
28
28
  <% if allowed_to? :update, :attachment_collection, attachment_collection: attachment_collection %>
@@ -1,7 +1,7 @@
1
1
  <h3><%= translated_attribute(@attachment_collection.name) %></h3>
2
2
 
3
3
  <div class="actions">
4
- <hr />
4
+ <hr>
5
5
  <%= link_to t("decidim.admin.actions.edit"), ["edit", @attachment_collection.collection_for, @attachment_collection], class: "button" if allowed_to? :update, :attachment_collection, attachment_collection: @attachment_collection %>
6
6
  <%= link_to t("decidim.admin.actions.destroy"), [@attachment_collection.collection_for, @attachment_collection], method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if allowed_to? :destroy, :attachment_collection, attachment_collection: @attachment_collection %>
7
7
  </div>
@@ -25,7 +25,7 @@
25
25
  <% attached_to.attachments.each do |attachment| %>
26
26
  <tr data-id="<%= attachment.id %>">
27
27
  <td>
28
- <%= link_to translated_attribute(attachment.title), edit_polymorphic_path([attached_to, attachment]) %><br />
28
+ <%= link_to translated_attribute(attachment.title), edit_polymorphic_path([attached_to, attachment]) %><br>
29
29
  </td>
30
30
  <td>
31
31
  <%= translated_attribute(attachment.attachment_collection&.name) %>
@@ -1,7 +1,7 @@
1
1
  <h3><%= translated_attribute(@attachment.title) %></h3>
2
2
 
3
3
  <div class="actions">
4
- <hr />
4
+ <hr>
5
5
  <%= link_to t("decidim.admin.actions.edit"), ["edit", @attachment.attached_to, @attachment] if allowed_to? :update, :attachment, attachment: @attachment %>
6
6
  <%= link_to t("decidim.admin.actions.destroy"), [@attachment.attached_to, @attachment], method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if allowed_to? :destroy, :attachment, attachment: @attachment %>
7
7
  </div>
@@ -22,7 +22,7 @@
22
22
  <% current_participatory_space.categories.first_class.each do |category| %>
23
23
  <tr>
24
24
  <td>
25
- <%= link_to translated_attribute(category.name), edit_category_path(current_participatory_space, category) %><br />
25
+ <%= link_to translated_attribute(category.name), edit_category_path(current_participatory_space, category) %><br>
26
26
  </td>
27
27
  <td class="table-list__actions">
28
28
  <% if allowed_to? :update, :category, category: category %>
@@ -43,7 +43,7 @@
43
43
  <% category.subcategories.each do |subcategory| %>
44
44
  <tr class="extra__table-list__subcategory">
45
45
  <td>
46
- <%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %><br />
46
+ <%= link_to translated_attribute(subcategory.name), edit_category_path(current_participatory_space, subcategory) %><br>
47
47
  </td>
48
48
  <td class="table-list__actions">
49
49
  <% if allowed_to? :update, :category, category: subcategory %>
@@ -1,7 +1,7 @@
1
1
  <h3><%= translated_attribute(@category.name) %></h3>
2
2
 
3
3
  <div class="actions">
4
- <hr />
4
+ <hr>
5
5
  <%= link_to t("decidim.admin.actions.edit"), ["edit", participatory_space, @category] if allowed_to? :update, :category, category: @category %>
6
6
  <%= link_to t("decidim.admin.actions.destroy"), [participatory_space, @category], method: :delete, class: "alert button", data: { confirm: t("decidim.admin.actions.confirm_destroy") } if allowed_to? :destroy, :category, category: @category %>
7
7
  </div>
@@ -19,8 +19,8 @@
19
19
  <%= render partial: "decidim/admin/components/settings_fields",
20
20
  locals: {
21
21
  form: settings_fields,
22
- component: @component,
23
- settings_name: "global",
22
+ manifest: form.object.manifest,
23
+ settings_name: :global,
24
24
  tabs_prefix: "global-settings"
25
25
  } %>
26
26
  <% end %>
@@ -46,8 +46,8 @@
46
46
  <%= render partial: "decidim/admin/components/settings_fields",
47
47
  locals: {
48
48
  form: settings_fields,
49
- component: component,
50
- settings_name: "step",
49
+ manifest: form.object.manifest,
50
+ settings_name: :step,
51
51
  tabs_prefix: "step-#{step.id}-settings"
52
52
  } %>
53
53
  <% end %>
@@ -68,8 +68,8 @@
68
68
  <%= render partial: "decidim/admin/components/settings_fields",
69
69
  locals: {
70
70
  form: settings_fields,
71
- component: @component,
72
- settings_name: "step",
71
+ manifest: form.object.manifest,
72
+ settings_name: :step,
73
73
  tabs_prefix: "default-step-settings"
74
74
  } %>
75
75
  <% end %>