app/forms/tramway/landing/block_form.rb in tramway-landing-1.8.1.2 vs app/forms/tramway/landing/block_form.rb in tramway-landing-1.8.2
- old
+ new
@@ -1,26 +1,20 @@
# frozen_string_literal: true
class Tramway::Landing::BlockForm < ::Tramway::Core::ExtendedApplicationForm
- properties :title,
- :background,
- :view_state,
- :block_type,
- :position,
- :navbar_link,
- :anchor,
- :description,
- :link_object_type,
- :link_object_id,
- :button_title,
- :button_link,
- :view_name
+ properties :title, :background, :view_state, :block_type, :position, :navbar_link, :anchor, :description,
+ :link_object_type, :link_object_id, :button_title, :button_link, :view_name
def initialize(object = nil)
super(object).tap do
form_properties title: :string,
background: :file,
- position: :numeric,
+ 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,