Sha256: 6f516eccff9680bd395dde7d900965048ca3b24c2a6cbb2bf1eabe29709d3151

Contents?: true

Size: 838 Bytes

Versions: 8

Compression:

Stored size: 838 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    module Admin
      # A form object used to create participatory process groups from the admin
      # dashboard.
      #
      class ParticipatoryProcessGroupForm < Form
        include TranslatableAttributes
        include Decidim::HasUploadValidations

        translatable_attribute :name, String
        translatable_attribute :description, String
        attribute :participatory_process_ids, Array[Integer]

        mimic :participatory_process_group

        attribute :hero_image
        attribute :remove_hero_image

        validates :name, :description, translatable_presence: true

        validates :hero_image, passthru: { to: Decidim::ParticipatoryProcessGroup }

        alias organization current_organization
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.23.6 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.5 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.4 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.3 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.2 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.1 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.1.rc1 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb
decidim-participatory_processes-0.23.0 app/forms/decidim/participatory_processes/admin/participatory_process_group_form.rb