Sha256: c0b7b434dbceb965cafcc0db12a243a123abe3fb240bce8083d06d28733ff426

Contents?: true

Size: 489 Bytes

Versions: 8

Compression:

Stored size: 489 Bytes

Contents

module MotionPrime
  class StringFieldSection < BaseFieldSection
    element :label, type: :label do
      default_label_options
    end

    element :input, type: :text_field, delegate: proc { form.table_delegate } do
      options[:input] || {}
    end

    element :error_message, type: :error_message, text: proc { all_errors.join("\n") if observing_errors? }
    after_render :bind_text_input

    def value
      view(:input).text
    end

    def input?
      true
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
motion-prime-0.9.5 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.4 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.3 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.2 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.1 motion-prime/sections/form/string_field_section.rb
motion-prime-0.9.0 motion-prime/sections/form/string_field_section.rb
motion-prime-0.8.12 motion-prime/sections/form/string_field_section.rb
motion-prime-0.8.11 motion-prime/sections/form/string_field_section.rb