Sha256: 764fe97908d3e68a7fbc5d139aae21119265786d39bc56e2fe2b697f36915261

Contents?: true

Size: 546 Bytes

Versions: 10

Compression:

Stored size: 546 Bytes

Contents

module MotionPrime
  class TextFieldSection < BaseFieldSection
    element :label, type: :label do
      default_label_options
    end
    element :input, type: :text_view, delegate: proc { collection_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

10 entries across 10 versions & 1 rubygems

Version Path
motion-prime-1.0.7 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.6 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.5 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.4 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.3 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.2 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.1 motion-prime/sections/form/text_field_section.rb
motion-prime-1.0.0 motion-prime/sections/form/text_field_section.rb
motion-prime-0.9.9.2 motion-prime/sections/form/text_field_section.rb
motion-prime-0.9.9.1 motion-prime/sections/form/text_field_section.rb