twitter-bootstrap-form-builder 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ module MNE
33
33
  return super(field, *args) if label_tag === false
34
34
 
35
35
  # create a help-block if present
36
- help_block = opts[:help_block] ? @template.content_tag(:p, opts[:help_block], :class => "help-block") : ""
36
+ help_block = opts[:help_block] ? @template.content_tag(:p, opts.delete(:help_block), :class => "help-block") : ""
37
37
 
38
38
  # propogate properties of control group up
39
39
  control_group_opts = opts[:control_group] || {}
@@ -61,15 +61,17 @@ module MNE
61
61
  control_group(field, control_group_opts) do
62
62
  label_tag + @template.content_tag(:div, :class => "controls") do
63
63
 
64
- check_box_tag = super(field, options, checked_value, unchecked_value).html_safe
64
+ opts = options.clone
65
+ opts[:text] = nil
66
+ check_box_tag = super(field, opts, checked_value, unchecked_value).html_safe
65
67
 
66
- about_tag = build_label_tag(field, options, :text, {:class => "checkbox"}) do |opts|
67
- check_box_tag + opts[0].html_safe
68
+ text_tag = build_label_tag(field, options, :text, {:class => "checkbox"}) do |opts|
69
+ "#{check_box_tag} #{opts[0]}".html_safe
68
70
  end
69
71
 
70
- about_tag ||= @template.content_tag(:label, check_box_tag, :class => "checkbox")
72
+ text_tag ||= @template.content_tag(:label, check_box_tag, :class => "checkbox")
71
73
 
72
- about_tag.html_safe + errors_for(field)
74
+ text_tag.html_safe + errors_for(field)
73
75
  end.html_safe
74
76
  end.html_safe
75
77
  end
@@ -1,5 +1,5 @@
1
1
  module MNE
2
2
  module TwitterBootstrapFormBuilder
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matthew Eagar