Permalink
Browse files

Converts "control-group" to "form-group".

This is work to support Bootstrap 3.  Take the elements which had
a "control-group" class added and change it to "form-group". Change
the method names to reflect this.
  • Loading branch information...
1 parent 95fed68 commit 2b74b90d344b59abc6be110ab11a2ba5ee5b561a @mjbellantoni committed Nov 24, 2013
@@ -4,7 +4,7 @@ module Base
module Timeish
def to_html
- control_group_wrapping do
+ form_group_wrapping do
control_label_html <<
controls_wrapping do
hidden_fragments <<
@@ -15,7 +15,7 @@ def bootstrap_wrapping(&block)
hint_html
].compact.join("\n").html_safe
- control_group_wrapping do
+ form_group_wrapping do
control_label_html <<
controls_wrapping do
if prepended_or_appended?(options)
@@ -38,7 +38,7 @@ def add_on_content(content)
template.content_tag(:span, content, :class => 'add-on')
end
- def control_group_wrapping(&block)
+ def form_group_wrapping(&block)
template.content_tag(:div,
template.capture(&block).html_safe,
wrapper_html_options
@@ -60,7 +60,7 @@ def controls_wrapper_html_options
def wrapper_html_options
super.tap do |options|
- options[:class] << " control-group"
+ options[:class] << " form-group"
end
end
@@ -5,7 +5,7 @@ class BooleanInput < Formtastic::Inputs::BooleanInput
include Base
def to_html
- control_group_wrapping do
+ form_group_wrapping do
(options[:label_outside] ? control_label_html : "".html_safe) <<
hidden_field_html <<
controls_wrapping do
@@ -8,7 +8,7 @@ class CheckBoxesInput < Formtastic::Inputs::CheckBoxesInput
# TODO Support .inline
def to_html
- control_group_wrapping do
+ form_group_wrapping do
control_label_html <<
hidden_field_for_all <<
controls_wrapping do
@@ -8,7 +8,7 @@ class RadioInput < Formtastic::Inputs::RadioInput
# TODO Support .inline
def to_html
- control_group_wrapping do
+ form_group_wrapping do
control_label_html <<
controls_wrapping do
collection.map { |choice|

0 comments on commit 2b74b90

Please sign in to comment.