Sha256: 80b112675d70d7a5e389c1caa68534327de5587fff9a3e502fb466b35a29222b
Contents?: true
Size: 1.1 KB
Versions: 2
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true module Decidim module DecidimAwesome module Admin class ConfigForm < Decidim::Form attribute :allow_images_in_full_editor, Boolean attribute :allow_images_in_small_editor, Boolean attribute :allow_images_in_proposals, Boolean attribute :use_markdown_editor, Boolean attribute :allow_images_in_markdown_editor, Boolean attribute :auto_save_forms, Boolean attribute :scoped_styles, Hash attribute :menu, Array[MenuForm] attribute :intergram_for_admins, Boolean attribute :intergram_for_admins_settings, IntergramForm attribute :intergram_for_public, Boolean attribute :intergram_for_public_settings, IntergramForm # collect all keys anything not specified in the params (UpdateConfig command ignores it) attr_accessor :valid_keys def self.from_params(params, additional_params = {}) instance = super(params, additional_params) instance.valid_keys = params.keys.map(&:to_sym) || [] instance end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
decidim-decidim_awesome-0.6.6 | app/forms/decidim/decidim_awesome/admin/config_form.rb |
decidim-decidim_awesome-0.6.5 | app/forms/decidim/decidim_awesome/admin/config_form.rb |