Sha256: c7a75ca6b70a59b351836b801acf3c2fad629236bae6c275e90d6aaf3a42e68f

Contents?: true

Size: 1.46 KB

Versions: 49

Compression:

Stored size: 1.46 KB

Contents

# -*- encoding : utf-8 -*-
class Card; module Set; class All; module Bootstrap; module Form; extend Card::Set
# ~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/bootstrap/set/all/bootstrap/form.rb ~~
format :html do
  def button_tag content_or_options=nil, options={}, &block
    bootstrapify_button(block_given? ? content_or_options : options)
    super(content_or_options, options, &block)
  end

  def bootstrapify_button options
    situation = options.delete(:situation) || "default"
    options[:class] = [options[:class], "btn", "btn-#{situation}"].compact * " "
  end

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

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

  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

  FIELD_HELPERS.each do |method_name|
    define_method(method_name) do |name, options={}|
      form.send(method_name, name, bootstrap_options(options))
    end
  end
end


# ~~ below autogenerated; above pulled from /Users/ethan/dev/wagn/gem/card/mod/bootstrap/set/all/bootstrap/form.rb ~~
end;end;end;end;end;

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
card-1.99.6 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.99.5 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.97.0.1 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.97.0 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.8 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.7 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.6 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.5 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.4 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.3 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.2 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.1 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.96.0 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.95.3 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.95.2 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.95.1 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.95.0 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.94.1 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.94.0 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb
card-1.93.13 tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb