Sha256: eaf16da8d9edad70435359b15d44972c53439d79a694b7ea686884925281bee7
Contents?: true
Size: 852 Bytes
Versions: 6
Compression:
Stored size: 852 Bytes
Contents
# frozen_string_literal: true module Decidim module NavigationMaps # A form object used to configure the blueprint content block from the admin panel. # class AreaForm < Decidim::Form include TranslatableAttributes mimic :blueprint_area attribute :area, Object attribute :area_type, String attribute :area_id, String attribute :link, String attribute :link_type, String attribute :no_popup, String attribute :color, String translatable_attribute :title, String translatable_attribute :description, String def no_popup return link_type == "direct" unless super super.to_i.nonzero? end def color return "#2262cc" if super.blank? return "##{super}" unless super.match?(/^#/) super end end end end
Version data entries
6 entries across 6 versions & 1 rubygems