simple_form_bootstrap3 0.3.1 → 0.3.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be67c2ed5b073a6d4860ca707441b643b31f38ca
|
4
|
+
data.tar.gz: 766a6094f8b928935d578ae9d7ed963ac4b1c5a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4641c0aa3737615814225b4763283659e21850cec6d8f1aa738d05b6c5fe91963f6898d902323a89a2fd33f2904ed58d004266e21ed9a002fe74f89af6440d3d
|
7
|
+
data.tar.gz: 552ca0ac45ce8a084089baef1e60983254c624dc0fb20a2e058b0be559dd34c657efa2367f202c9466938f49d6c580cfb4bf57ee53bcf67f3dd2c0bf7e601220
|
@@ -21,5 +21,20 @@ module SimpleForm
|
|
21
21
|
options[:wrapper] ||= self.class::CHECKBOX_WRAPPER if options[:as] == :boolean
|
22
22
|
super
|
23
23
|
end
|
24
|
+
|
25
|
+
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
|
26
|
+
options[:collection_wrapper_tag] ||= :div
|
27
|
+
options[:collection_wrapper_class] ||= 'form-group'
|
28
|
+
options[:item_wrapper_tag] ||= :div
|
29
|
+
options[:item_wrapper_class] ||= 'checkbox'
|
30
|
+
|
31
|
+
if block_given?
|
32
|
+
super
|
33
|
+
else
|
34
|
+
super do |input|
|
35
|
+
input.label { input.check_box + input.text }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
24
39
|
end
|
25
40
|
end
|
@@ -12,5 +12,19 @@ module SimpleForm
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
|
17
|
+
options[:item_wrapper_class] ||= 'col-sm-offset-3 col-sm-9 col-md-offset-3 col-md-9 col-lg-offset-2 col-lg-10'
|
18
|
+
|
19
|
+
if block_given?
|
20
|
+
super
|
21
|
+
else
|
22
|
+
super do |input|
|
23
|
+
@template.content_tag(:div, class: 'checkbox') do
|
24
|
+
input.label { input.check_box + input.text }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
15
29
|
end
|
16
30
|
end
|