Sha256: 3b260f8d0c84c9934541fb1815ea4321632bad0eb8032af3c70321d4f446f94d

Contents?: true

Size: 1.18 KB

Versions: 12

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

class Admin::Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationForm
  association :page

  properties :title, :background, :view_state_event, :block_type, :position, :navbar_link, :anchor, :description,
    :link_object_type, :link_object_id, :button_title, :button_link, :view_name, :form_url

  def initialize(object = nil)
    super(object).tap do
      form_properties page: :association,
                      title: :string,
                      background: :file,
                      position: {
                        type: :numeric,
                        input_options: {
                          hint: I18n.t('hints.tramway.landing.block.position', array: ::Tramway::Landing::Block.active.on_main_page.map(&:position).join(','))
                        }
                      },
                      block_type: :default,
                      navbar_link: :default,
                      anchor: :string,
                      description: :ckeditor,
                      button_title: :string,
                      button_link: :string,
                      view_name: :string,
                      form_url: :string
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tramway-landing-3.0.3 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.2.4 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.2.3 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.2.2 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.2.1 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.2 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.1.2 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.1.1 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.1 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.0.2 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0.0.1 app/forms/admin/tramway/landing/block_form.rb
tramway-landing-3.0 app/forms/admin/tramway/landing/block_form.rb