From a832b40fba68d79197c2de3d7ffcd4edf982ec65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 16 Feb 2012 13:35:41 -0200 Subject: [PATCH] Do not wrap the label in bootstrap wrapper Also use control-label as default class to labels --- .../templates/config/initializers/simple_form.rb.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/generators/simple_form/templates/config/initializers/simple_form.rb.tt b/lib/generators/simple_form/templates/config/initializers/simple_form.rb.tt index 5f361722..dcf7e908 100644 --- a/lib/generators/simple_form/templates/config/initializers/simple_form.rb.tt +++ b/lib/generators/simple_form/templates/config/initializers/simple_form.rb.tt @@ -47,7 +47,7 @@ SimpleForm.setup do |config| <% if options.bootstrap? %> config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b| b.use :placeholder - b.use :label, :wrap_with => { :class => 'control-label' } + b.use :label b.wrapper :tag => 'div', :class => 'controls' do |ba| ba.use :input ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' } @@ -133,7 +133,7 @@ SimpleForm.setup do |config| # config.label_text = lambda { |label, required| "#{required} #{label}" } # You can define the class to use on all labels. Default is nil. - # config.label_class = nil + config.label_class = 'control-label' # You can define the class to use on all forms. Default is simple_form. # config.form_class = :simple_form