bulma_form_builder 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bulma_form_builder/inputs/check_box.rb +9 -2
- data/lib/bulma_form_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51f26b98a29477b64bd28c5a422a0b1a988c80bd2e8e4b97366e4d35680248a
|
4
|
+
data.tar.gz: 45e6f7c0aa54c619ad54a72e226b3fa7d81e27d62f2926e498c82435163baa31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c551a24eea9f8354628905b3c5dab4430d774823b7245b5add50d590fbbf1db562fb1e7df4cdff903340f1ff81ecef41210a57ba64570371c6bcf950400c3ea
|
7
|
+
data.tar.gz: dd921cae6c47172576cba3a5631e6dc250e997e26989bfc4d81760620cc0c73dd103bf21f47c847837b75e860c4029a9dc4001bede44f797aa845bb6f9c90e1a
|
data/CHANGELOG.md
CHANGED
@@ -9,14 +9,21 @@ module BulmaFormBuilder
|
|
9
9
|
def check_box_with_bulma(name, options = {}, checked_value = '1', unchecked_value = '0', &block)
|
10
10
|
options = options.symbolize_keys!
|
11
11
|
check_box_options = options.except(:class, :label, :label_class, :error_message, :help, :inline, :custom, :hide_label, :skip_label, :wrapper_class)
|
12
|
+
wrapper_class = ['field', options[:wrapper_class]].compact
|
12
13
|
|
13
|
-
content_tag(:div, class:
|
14
|
-
content_tag(:label, class: 'checkbox') do
|
14
|
+
content_tag(:div, class: wrapper_class) do
|
15
|
+
checkbox = content_tag(:label, class: 'checkbox') do
|
15
16
|
html = check_box_without_bulma(name, check_box_options, checked_value, unchecked_value)
|
16
17
|
html.concat(check_box_label(name)) unless options[:skip_label]
|
17
18
|
html.concat(generate_error(name)) if options[:error_message]
|
18
19
|
html
|
19
20
|
end
|
21
|
+
|
22
|
+
if options[:help].present?
|
23
|
+
checkbox.concat(content_tag(:p, options[:help], class: 'help'))
|
24
|
+
end
|
25
|
+
|
26
|
+
checkbox
|
20
27
|
end
|
21
28
|
end
|
22
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulma_form_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki77
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|