Module: JohnHancock::Rails::FormBuilder

Includes:
ActionView::Helpers::TagHelper
Defined in:
lib/john_hancock/rails/form_builder.rb

Instance Method Summary collapse

Instance Method Details

#hidden_signature_field(attribute) ⇒ Object



10
11
12
# File 'lib/john_hancock/rails/form_builder.rb', line 10

def hidden_signature_field(attribute)
  hidden_field(attribute.to_sym, id: 'JohnHancock-hidden')
end

#signature_canvasObject



6
7
8
# File 'lib/john_hancock/rails/form_builder.rb', line 6

def signature_canvas
  (:canvas, nil, id: 'JohnHancock-canvas')
end

#signature_field(attribute) ⇒ Object



14
15
16
17
18
19
# File 'lib/john_hancock/rails/form_builder.rb', line 14

def signature_field(attribute)
  tags = []
  tags << signature_canvas
  tags << hidden_signature_field(attribute)
  tags.join(' ').html_safe
end