Class: Decidim::Admin::ComponentForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
decidim-admin/app/forms/decidim/admin/component_form.rb

Overview

A form object used to attach a component to a participatory process from the admin panel.

Direct Known Subclasses

Budgets::Admin::ComponentForm

Instance Method Summary collapse

Methods included from TranslatableAttributes

#default_locale?

Instance Method Details

#default_step_settings?Boolean

Returns:

  • (Boolean)

32
33
34
# File 'decidim-admin/app/forms/decidim/admin/component_form.rb', line 32

def default_step_settings?
  default_step_settings.manifest.attributes.any?
end

#map_model(model) ⇒ Object


36
37
38
# File 'decidim-admin/app/forms/decidim/admin/component_form.rb', line 36

def map_model(model)
  self.share_tokens = model.share_tokens
end

#settings?Boolean

Returns:

  • (Boolean)

28
29
30
# File 'decidim-admin/app/forms/decidim/admin/component_form.rb', line 28

def settings?
  settings.manifest.attributes.any?
end