fwt_bootstrap_rails 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9406af9fe34250ce25289b1df82acf7df8839f5d
4
- data.tar.gz: 00b734a16c363f7395dd66e9cf01d90421799f84
3
+ metadata.gz: 2c0ef5561585f35ad0eadf66ad751a7074662217
4
+ data.tar.gz: f68c1e78cc1231bcef597979a350e36d49c0f5a4
5
5
  SHA512:
6
- metadata.gz: c8952b8a41d1b909d1b05c3658a194573929ddd9ceabff2a9bbf7ec4db9479d1621304e15e959aa01bf18911b460d230d4e75d7ba99342d62581d4e5f8d06717
7
- data.tar.gz: 1953824137f7be5e612c1af150bacfb0389ddd3af1b1a1619831884077595ae495be7e2c024824a55d9bfe7882503a76f1ab6da86a47100da1b27aee70d3a4b7
6
+ metadata.gz: ce6d9e6f65d7d15301924433d6ac1b4c90a891f5688862e1fb75339b56e4390548ca153faef3d8d99650efb06fef81013b7aa27c44accb8cf3a1f2f2bdbd8502
7
+ data.tar.gz: c8a672907e7e1a2c65286e05f3f56bebf0a2c74851a13839ef671cd47c9fc15685bcbc2c7a9761ef26b198b4e578baa23c5e62ce90b2e634bfd0454b17c17f65
@@ -44,7 +44,7 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
44
44
  html = "<div class='form-group'>"
45
45
  html << self.label(@object_name, name)
46
46
  html << "<br/>"
47
- html << super(@object_name, name, options_for_select, {:include_blank => true}, :class => "form-control")
47
+ html << super(@object_name, name, options_for_select, {:include_blank => true})
48
48
  html << "</div>"
49
49
  raw(html)
50
50
  end
@@ -77,7 +77,15 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
77
77
  super(@object_name, name, *args)
78
78
  elsif method_name == :radio_button
79
79
  options[:checked] = (@object.send(name) == args[0])
80
- super(@object_name, name, *(args << options))
80
+ super(@object_name, name, *(args << options))
81
+ elsif method_name == :check_box
82
+ options = args.extract_options!
83
+ options[:checked] = (@object.send(name) == true)
84
+ @template.content_tag("div",
85
+ @template.label_tag(name) +
86
+ super(@object_name, name, *(args << options)),
87
+ {:class => "checkbox"}
88
+ )
81
89
  else
82
90
  options = args.extract_options!
83
91
  options[:class] = "form-control"
@@ -88,15 +96,13 @@ class BootstrapFormBuilder < ActionView::Helpers::FormBuilder
88
96
  options[:cols] = 10
89
97
  end
90
98
 
91
- if method_name == :check_box
92
- options[:checked] = (@object.send(name) == true)
93
- end
94
-
95
99
  @template.content_tag("div",
96
- @template.label_tag(name) +
100
+ @template.label_tag(name) +
97
101
  super(@object_name, name, *(args << options)),
98
102
  {:class => "form-group"}
99
- )
103
+ )
104
+
105
+
100
106
  end
101
107
  end
102
108
  end
@@ -1,3 +1,3 @@
1
1
  module FwtBootstrapRails
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fwt_bootstrap_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-19 00:00:00.000000000 Z
11
+ date: 2014-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails