Sha256: f96d09a90ccc2f1d6bdfaf1732d01c9f8a523afb90167d9784d877f722d55c94

Contents?: true

Size: 488 Bytes

Versions: 78

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # A form object used to configure a content block from the admin panel.
    #
    class ContentBlockForm < Decidim::Form
      include TranslatableAttributes

      mimic :content_block

      attribute :settings, Object
      attribute :images, Hash

      def map_model(model)
        self.images = model.images_container
      end

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

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
decidim-admin-0.29.1 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.4 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.27.9 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.29.0 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.3 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.27.8 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.29.0.rc4 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.29.0.rc3 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.29.0.rc2 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.29.0.rc1 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.2 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.27.7 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.1 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.27.6 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.26.10 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.26.9 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.0 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.27.5 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.0.rc5 app/forms/decidim/admin/content_block_form.rb
decidim-admin-0.28.0.rc4 app/forms/decidim/admin/content_block_form.rb