simple_form_bootstrap3 0.3.1 → 0.3.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: f26fd475c7f606bc38cd404177953a1537174c7e
4
- data.tar.gz: af2e59a3ee3e87daf94c2d6246a6bc9ee8066d68
3
+ metadata.gz: be67c2ed5b073a6d4860ca707441b643b31f38ca
4
+ data.tar.gz: 766a6094f8b928935d578ae9d7ed963ac4b1c5a3
5
5
  SHA512:
6
- metadata.gz: 0425e448ee9940b67b2c3d842ae919c47e0ff027708ca28bad5d5bb396f20b5dde51bd2fde9604832f6e368ae5de342f3cb8fe98312558ce93f8151ba1ac6f83
7
- data.tar.gz: 4bd5ca0bf084e76b24057f7baf3679da8c824de582ec7fc59ef1316c3cf68fa3243328944f28f52b2b5ae3e145256d1620d2a10a2aaff43a36807758444a9148
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
@@ -1,3 +1,3 @@
1
1
  module SimpleFormBootstrap3
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_bootstrap3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuriy Kolodovskyy