Sha256: 339f702f4a1da100530fbf16450137e632d83c3bf7c6b48a655f26986292ab13

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

module MotionPrime
  class PasswordFieldSection < BaseFieldSection
    element :label, type: :label do
      {
        styles: [
          :base_field_label,
          :base_password_field_label,
          :"#{form_name}_field_label",
          :"#{form_name}_#{name}_field_label"
        ]
      }.merge(options[:label] || {})
    end
    element :input, type: :text_field do
      {
        styles: [
          :base_field_input,
          :base_password_field_input,
          :"#{form_name}_field_input",
          :"#{form_name}_#{name}_field_input"
        ],
        secureTextEntry: true
      }.merge(options[:input] || {})
    end
    after_render :render_input

    def render_input
      view(:input).on :editing_did_begin do |view|
        focus
        form.on_edit(self)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
motion-prime-0.1.4 motion-prime/sections/form/password_field_section.rb
motion-prime-0.1.3 motion-prime/sections/form/password_field_section.rb
motion-prime-0.1.2 motion-prime/sections/form/password_field_section.rb