katalyst-govuk-formbuilder 1.2.1 → 1.2.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/lib/govuk_design_system_formbuilder/elements/{boolean_checkbox_field.rb → check_box_field.rb} +4 -4
- data/lib/govuk_design_system_formbuilder/elements/rich_text_area.rb +0 -2
- data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
- data/lib/katalyst/govuk/formbuilder.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0239e89e8855a5ded349983abca46fbf5a5c0bd7afb2acc9c550baf167c10f27'
|
4
|
+
data.tar.gz: 1c644907ab50cf26ea1d179d829c0c14498b01e8ce2f1639fc64efdac009d32f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ce9b3e9bfd4068f39b984d3b8035335b51dc141ad65a56f42ee373688c777ddd4a1db38fdbd8b7f4a4a0b5863e45b63767676ad90927a48899778890670dea9
|
7
|
+
data.tar.gz: 4ac11cc52ef5cdffedca22504d96b8571611a62697f5aae4a4277d3828fedf3f87caa1f13cdd3b4617491465462f52a6b3658a334996afef0680f034c8be29e3
|
data/lib/govuk_design_system_formbuilder/elements/{boolean_checkbox_field.rb → check_box_field.rb}
RENAMED
@@ -4,7 +4,6 @@ require "govuk_design_system_formbuilder"
|
|
4
4
|
|
5
5
|
module GOVUKDesignSystemFormBuilder
|
6
6
|
module Builder
|
7
|
-
|
8
7
|
# Generates a check box within a fieldset to be used as a boolean toggle for a single attribute.
|
9
8
|
# The values are 1 (toggled on), and 0 (toggled off).
|
10
9
|
#
|
@@ -25,14 +24,15 @@ module GOVUKDesignSystemFormBuilder
|
|
25
24
|
# @return [ActiveSupport::SafeBuffer] HTML output
|
26
25
|
#
|
27
26
|
# @example A single check box for terms and conditions
|
28
|
-
# = f.
|
27
|
+
# = f.govuk_check_box_field :terms_agreed,
|
29
28
|
# link_errors: true,
|
30
29
|
# label: { text: 'Do you agree with our terms and conditions?' },
|
31
30
|
# hint: { text: 'You will not be able to proceed unless you do' }
|
32
31
|
#
|
33
|
-
def
|
32
|
+
def govuk_check_box_field(attribute_name, value = 1, unchecked_value = 0,
|
33
|
+
small: false, hint: {}, label: {}, link_errors: false, **kwargs, &block)
|
34
34
|
govuk_check_boxes_fieldset(attribute_name, legend: nil, multiple: false, small: small) do
|
35
|
-
govuk_check_box(attribute_name,
|
35
|
+
govuk_check_box(attribute_name, value, unchecked_value,
|
36
36
|
hint: hint,
|
37
37
|
label: label,
|
38
38
|
link_errors: link_errors,
|
@@ -53,8 +53,6 @@ end
|
|
53
53
|
|
54
54
|
module GOVUKDesignSystemFormBuilder
|
55
55
|
module Builder
|
56
|
-
delegate :config, to: GOVUKDesignSystemFormBuilder
|
57
|
-
|
58
56
|
# Generates a pair of +trix-toolbar+ and +trix-editor+ elements with a label, optional hint. Requires action-text to
|
59
57
|
# be correctly setup in the application
|
60
58
|
#
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "govuk_design_system_formbuilder"
|
2
2
|
require "govuk_design_system_formbuilder/elements/rich_text_area"
|
3
|
-
require "govuk_design_system_formbuilder/elements/
|
3
|
+
require "govuk_design_system_formbuilder/elements/check_box_field"
|
4
4
|
|
5
5
|
require "katalyst/govuk/formbuilder/engine"
|
6
6
|
require "katalyst/govuk/formbuilder/frontend"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-govuk-formbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_design_system_formbuilder
|
@@ -38,7 +38,7 @@ files:
|
|
38
38
|
- app/assets/javascripts/katalyst/govuk/formbuilder.js
|
39
39
|
- app/assets/javascripts/katalyst/govuk/formbuilder.min.js
|
40
40
|
- config/importmap.rb
|
41
|
-
- lib/govuk_design_system_formbuilder/elements/
|
41
|
+
- lib/govuk_design_system_formbuilder/elements/check_box_field.rb
|
42
42
|
- lib/govuk_design_system_formbuilder/elements/rich_text_area.rb
|
43
43
|
- lib/katalyst/govuk/formbuilder.rb
|
44
44
|
- lib/katalyst/govuk/formbuilder/engine.rb
|