Module: JohnHancock::Rails::FormBuilder
- Includes:
- ActionView::Helpers::TagHelper
- Defined in:
- lib/john_hancock/rails/form_builder.rb
Instance Method Summary collapse
- #hidden_signature_field(attribute) ⇒ Object
- #signature_canvas ⇒ Object
- #signature_field(attribute) ⇒ Object
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_canvas ⇒ Object
6 7 8 |
# File 'lib/john_hancock/rails/form_builder.rb', line 6 def signature_canvas content_tag(: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) = [] << signature_canvas << hidden_signature_field(attribute) .join(' ').html_safe end |