fwt_bootstrap_rails 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/bootstrap_form_builder.rb +14 -8
- data/lib/fwt_bootstrap_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c0ef5561585f35ad0eadf66ad751a7074662217
|
4
|
+
data.tar.gz: f68c1e78cc1231bcef597979a350e36d49c0f5a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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}
|
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
|
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.
|
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-
|
11
|
+
date: 2014-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|