bulma_form_builder 0.2.0 → 0.4.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 +19 -0
- data/bulma_form_builder.gemspec +1 -1
- data/lib/bulma_form_builder/form_builder.rb +2 -1
- data/lib/bulma_form_builder/inputs.rb +1 -0
- data/lib/bulma_form_builder/inputs/base.rb +1 -1
- data/lib/bulma_form_builder/inputs/check_box.rb +5 -3
- data/lib/bulma_form_builder/inputs/select.rb +3 -1
- data/lib/bulma_form_builder/inputs/url_field.rb +13 -0
- data/lib/bulma_form_builder/version.rb +1 -1
- metadata +5 -5
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d49a76ef23a5099b351c56dd11ece5463b4f3d8f932839aed7c28593df83aa8f
|
4
|
+
data.tar.gz: 39d5cd635ff8b41f32b565a99e48e860af0962bcd9599d7874ee928a3bab755a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd98e10102a2147b0c434e90a0273c732cc6538037ef9b8a039a26db62035e93de2f5b5966621060b32abbaa4226aecd21980d2659c1c8c898f81ba4c2a2940b
|
7
|
+
data.tar.gz: 66d03b9bfe4d74dc2e83d892db4d5444d4d7a32a4ebe5697dbaf1a741f35ad9519186add8d15ca74c8240dc3379c4f9ed62ec41e993824d7c61040705c2736ec
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## 0.4.0
|
2
|
+
|
3
|
+
- Update dependency
|
4
|
+
- Fix error display in check_box
|
5
|
+
|
6
|
+
## 0.3.1
|
7
|
+
|
8
|
+
- Update dependency
|
9
|
+
- Support for `tag` helper
|
10
|
+
|
11
|
+
## 0.3.0
|
12
|
+
|
13
|
+
- Add url_field
|
14
|
+
- Update dependency
|
15
|
+
|
16
|
+
## 0.2.1
|
17
|
+
|
18
|
+
- Support the check_box helper option
|
19
|
+
|
1
20
|
## 0.2.0
|
2
21
|
|
3
22
|
- Add collection_radio_buttons
|
data/bulma_form_builder.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_dependency "rails", ">=
|
25
|
+
spec.add_dependency "rails", ">= 6.0.3.7"
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 2.0"
|
28
28
|
spec.add_development_dependency "rake"
|
@@ -16,6 +16,7 @@ module BulmaFormBuilder
|
|
16
16
|
|
17
17
|
include BulmaFormBuilder::Inputs::Base
|
18
18
|
include BulmaFormBuilder::Inputs::EmailField
|
19
|
+
include BulmaFormBuilder::Inputs::UrlField
|
19
20
|
include BulmaFormBuilder::Inputs::DateField
|
20
21
|
include BulmaFormBuilder::Inputs::TimeField
|
21
22
|
include BulmaFormBuilder::Inputs::MonthField
|
@@ -28,7 +29,7 @@ module BulmaFormBuilder
|
|
28
29
|
include BulmaFormBuilder::Inputs::CollectionCheckBoxes
|
29
30
|
include BulmaFormBuilder::Inputs::CollectionRadioButtons
|
30
31
|
|
31
|
-
delegate :content_tag, :capture, :concat, to: :@template
|
32
|
+
delegate :content_tag, :capture, :concat, :tag, to: :@template
|
32
33
|
|
33
34
|
def initialize(object_name, object, template, options)
|
34
35
|
@layout = options[:layout]
|
@@ -4,6 +4,7 @@ require 'bulma_form_builder/inputs/collection_check_boxes'
|
|
4
4
|
require 'bulma_form_builder/inputs/collection_radio_buttons'
|
5
5
|
require 'bulma_form_builder/inputs/date_field'
|
6
6
|
require 'bulma_form_builder/inputs/email_field'
|
7
|
+
require 'bulma_form_builder/inputs/url_field'
|
7
8
|
require 'bulma_form_builder/inputs/month_field'
|
8
9
|
require 'bulma_form_builder/inputs/number_field'
|
9
10
|
require 'bulma_form_builder/inputs/password_field'
|
@@ -3,7 +3,7 @@ module BulmaFormBuilder
|
|
3
3
|
module Base
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
|
-
ELEMENTS_WITH_INPUT_CLASS = %i[email_field number_field password_field text_field].freeze
|
6
|
+
ELEMENTS_WITH_INPUT_CLASS = %i[email_field url_field number_field password_field text_field].freeze
|
7
7
|
|
8
8
|
class_methods do
|
9
9
|
def bulma_field(field_name)
|
@@ -9,14 +9,16 @@ 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
|
-
html.concat(generate_error(name)) if options[:error_message]
|
18
18
|
html
|
19
19
|
end
|
20
|
+
checkbox.concat(field_help(name, options))
|
21
|
+
checkbox
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
@@ -9,8 +9,10 @@ module BulmaFormBuilder
|
|
9
9
|
def select_with_bulma(method, choices = nil, options = {}, html_options = {}, &block)
|
10
10
|
html_options[:required] = options[:required]
|
11
11
|
|
12
|
+
div_class = ['select']
|
13
|
+
div_class.push('is-fullwidth') if options.delete(:fullwidth)
|
12
14
|
form_field_builder(method, options, html_options) do
|
13
|
-
content_tag(:div, class: '
|
15
|
+
content_tag(:div, class: div_class.join(' ')) do
|
14
16
|
select_without_bulma(method, choices, options, html_options, &block)
|
15
17
|
end
|
16
18
|
end
|
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.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aki77
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.0.3.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.0.3.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,7 +76,6 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
78
|
- ".rspec"
|
79
|
-
- ".travis.yml"
|
80
79
|
- CHANGELOG.md
|
81
80
|
- CODE_OF_CONDUCT.md
|
82
81
|
- Gemfile
|
@@ -108,6 +107,7 @@ files:
|
|
108
107
|
- lib/bulma_form_builder/inputs/text_area.rb
|
109
108
|
- lib/bulma_form_builder/inputs/text_field.rb
|
110
109
|
- lib/bulma_form_builder/inputs/time_field.rb
|
110
|
+
- lib/bulma_form_builder/inputs/url_field.rb
|
111
111
|
- lib/bulma_form_builder/railtie.rb
|
112
112
|
- lib/bulma_form_builder/version.rb
|
113
113
|
homepage: https://github.com/aki77/bulma_form_builder
|