Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update SimpleForm, use :div instead of :fieldset, update bootstrap css
  • Loading branch information
carlosantoniodasilva committed Jan 31, 2012
1 parent 278b44e commit 0e581b9
Show file tree
Hide file tree
Showing 3 changed files with 1,680 additions and 1,552 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/plataformatec/simple_form.git
revision: 533b76a17c469d3b669a3aa6d4b79d3529b9aedf
revision: 5aaa775d8970440ac96e1f7d7db269dd02b77221
specs:
simple_form (2.0.0.dev)
actionpack (~> 3.0)
Expand Down
7 changes: 3 additions & 4 deletions config/initializers/simple_form.rb
Expand Up @@ -45,7 +45,7 @@
b.use :error, :tag => :span, :class => :error
end

config.wrappers :bootstrap, :tag => 'fieldset', :class => 'control-group', :error_class => 'error' do |b|
config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b|
b.use :placeholder
b.use :label, :class => 'control-label'
b.use :tag => 'div', :class => 'controls' do |ba|
Expand All @@ -55,7 +55,7 @@
end
end

config.wrappers :prepend, :tag => 'fieldset', :class => "control-group", :error_class => 'error' do |b|
config.wrappers :prepend, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
b.use :placeholder
b.use :label, :class => 'control-label'
b.use :hint, :tag => 'span', :class => 'help-block'
Expand All @@ -67,7 +67,7 @@
end
end

config.wrappers :append, :tag => 'fieldset', :class => "control-group", :error_class => 'error' do |b|
config.wrappers :append, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
b.use :placeholder
b.use :label, :class => 'control-label'
b.use :hint, :tag => 'span', :class => 'help-block'
Expand All @@ -85,7 +85,6 @@
# buttons and other elements.
config.default_wrapper = :bootstrap


# Define the way to render check boxes / radio buttons with labels.
# Defaults to :nested for bootstrap config.
# :inline => input + label
Expand Down

0 comments on commit 0e581b9

Please sign in to comment.