Sha256: 3667bbefaf7a4b469978a6859e6edf8da33cda45049615cf0c2a6f1875bdebe9

Contents?: true

Size: 426 Bytes

Versions: 9

Compression:

Stored size: 426 Bytes

Contents

module MotionPrime
  class StringFieldSection < BaseFieldSection
    element :label, type: :label do
      options[:label] || {}
    end

    element :input, type: :text_field 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 events_off
      view(:input).off :change
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
motion-prime-0.6.0 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.7 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.6 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.5 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.4 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.3 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.2 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.1 motion-prime/sections/form/string_field_section.rb
motion-prime-0.5.0 motion-prime/sections/form/string_field_section.rb