Permalink
Browse files

Merge pull request #78 from nickl-/master

Fix :wrapper_html :class and :button_html :class options
  • Loading branch information...
2 parents 7fbf610 + 136c3bc commit 23c3dcdbd9cd583d95b9c2019dd66302a9206c87 @sodabrew sodabrew committed Aug 23, 2013
Showing with 10 additions and 5 deletions.
  1. +10 −5 lib/formtastic-bootstrap/actions/base.rb
@@ -4,17 +4,22 @@ module Base
# Bootstrap doesn't have wrappers.
def wrapper(&block)
- # TODO Detect if user passed wrapper_html_options and issue
- # a warning that they're ignored. (See the original in
- # Formtastic.)
template.capture(&block)
end
+ # Default button class
+ def default_wrapper_classes
+ ["btn"]
+ end
+
+ # :wrapper_html member :class is prefixed with btn
+ # :button_html member :class is all encompassing
def default_button_html
{
:accesskey => accesskey,
- :class => "btn"
- }
+ :class => wrapper_class.strip,
+ :id => wrapper_id
+ }
end
end

0 comments on commit 23c3dcd

Please sign in to comment.