Module: Card::Set::All::Bootstrap::Form::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod026-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
- #bootstrap_options(options) ⇒ Object
- #bootstrapify_button(options) ⇒ Object
- #button_tag(content_or_options = nil, options = {}, &block) ⇒ Object
- #type_field(args = {}) ⇒ Object
Instance Method Details
#bootstrap_options(options) ⇒ Object
25 26 27 28 29 |
# File 'tmpsets/set/mod026-bootstrap/all/bootstrap/form.rb', line 25 def [:class] ||= "" [:class] += " form-control" end |
#bootstrapify_button(options) ⇒ Object
14 15 16 17 |
# File 'tmpsets/set/mod026-bootstrap/all/bootstrap/form.rb', line 14 def situation = .delete(:situation) || "primary" [:class] = [[:class], "btn", "btn-#{situation}"].compact * " " end |
#button_tag(content_or_options = nil, options = {}, &block) ⇒ Object
9 10 11 12 |
# File 'tmpsets/set/mod026-bootstrap/all/bootstrap/form.rb', line 9 def =nil, ={}, &block (block_given? ? : ) super(, , &block) end |
#type_field(args = {}) ⇒ Object
19 20 21 22 23 |
# File 'tmpsets/set/mod026-bootstrap/all/bootstrap/form.rb', line 19 def type_field args={} args[:class] ||= "" args[:class] += " form-control" super(args) end |