Module: Card::Set::All::Bootstrap::Form::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/form.rb

Constant Summary collapse

FIELD_HELPERS =
%w[hidden_field color_field date_field datetime_field
datetime_local_field email_field month_field number_field
password_field phone_field range_field search_field
telephone_field text_area text_field time_field
url_field week_field file_field].freeze

Instance Method Summary collapse

Instance Method Details

#bootstrap_options(options) ⇒ Object



20
21
22
23
24
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/form.rb', line 20

def bootstrap_options options
  options[:class] ||= ""
  options[:class] += " form-control"
  options
end

#button_tag(content_or_options = nil, options = {}, &block) ⇒ Object



9
10
11
12
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/form.rb', line 9

def button_tag content_or_options=nil, options={}, &block
  bootstrapify_button(block_given? ? content_or_options : options)
  super(content_or_options, options, &block)
end

#type_field(args = {}) ⇒ Object



14
15
16
17
18
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/all/bootstrap/form.rb', line 14

def type_field args={}
  args[:class] ||= ""
  args[:class] += " form-control"
  super(args)
end