Sha256: b3270a7f83b51f0e6b864d07ec99f0101f443a63e899b2736128d43c43a2d342

Contents?: true

Size: 368 Bytes

Versions: 3

Compression:

Stored size: 368 Bytes

Contents

module MotionPrime
  class SubmitFieldSection < BaseFieldSection
    element :submit, type: :button do
      {title: options[:title]}
    end
    after_render :bind_submit

    def bind_submit
      view(:submit).on :touch do
        form.send(options[:action]) if options[:action]
      end
    end

    def events_off
      view(:submit).off :touch
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-prime-0.5.2 motion-prime/sections/form/submit_field_section.rb
motion-prime-0.5.1 motion-prime/sections/form/submit_field_section.rb
motion-prime-0.5.0 motion-prime/sections/form/submit_field_section.rb