Sha256: 7d4f67e60ae7e176b48283374b4469dd7c19ad1ef842f91bd5b1b4fc6b369574

Contents?: true

Size: 541 Bytes

Versions: 3

Compression:

Stored size: 541 Bytes

Contents

module MotionPrime
  class TextFieldSection < BaseFieldSection
    element :label, type: :label do
      default_label_options
    end
    element :input, type: :text_view, delegate: proc { table_delegate } do
      {editable: true}.merge(options[:input] || {})
    end

    element :error_message, type: :error_message, text: proc { |field| field.observing_errors? and field.all_errors.join("\n") }
    after_element_render :input, :bind_text_input

    def value
      view(:input).text
    end

    def input?
      true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-prime-0.9.9 motion-prime/sections/form/text_field_section.rb
motion-prime-0.9.8 motion-prime/sections/form/text_field_section.rb
motion-prime-0.9.7 motion-prime/sections/form/text_field_section.rb