govuk_elements_form_builder 1.1.0 → 1.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c1fe9769627ab203eb5a9740ea7e576cc48208b
|
4
|
+
data.tar.gz: 07647b82107b4bd8405e612ee8345272edabf7be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32bfcdcca34abce386ce9300ce2aebc7b78ab81d970ba072fd72c9255d01609845a3e9f04de2836fc473ffbf9b23774ee55167f44cecd289e4cbc0d7f68efb40
|
7
|
+
data.tar.gz: 7751a56bcbafdaf667e661539a2bca6417c50c29eae09e8918c00a0b987d8f8d5203e6a73e648b9a8cf56fd01ff79bd4f24996ace9d8a67221fb3c78571e8be4
|
@@ -82,7 +82,45 @@ module GovukElementsFormBuilder
|
|
82
82
|
|
83
83
|
(label+ super(method, collection, value_method, text_method, options , html_options)).html_safe
|
84
84
|
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def collection_check_boxes method, collection, value_method, text_method, options = {}, *args
|
88
|
+
content_tag :div,
|
89
|
+
class: form_group_classes(method),
|
90
|
+
id: form_group_id(method) do
|
91
|
+
content_tag :fieldset, fieldset_options(method, options) do
|
92
|
+
legend_key = method
|
93
|
+
legend = fieldset_legend(legend_key, options)
|
94
|
+
|
95
|
+
collection = super(method, collection, value_method, text_method, options) do |b|
|
96
|
+
content_tag :div, class: "multiple-choice" do
|
97
|
+
b.check_box + b.label
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
(legend + collection).html_safe
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
85
105
|
|
106
|
+
def collection_radio_buttons method, collection, value_method, text_method, options = {}, *args
|
107
|
+
content_tag :div,
|
108
|
+
class: form_group_classes(method),
|
109
|
+
id: form_group_id(method) do
|
110
|
+
content_tag :fieldset, fieldset_options(method, options) do
|
111
|
+
|
112
|
+
legend_key = method
|
113
|
+
legend = fieldset_legend(legend_key, options)
|
114
|
+
|
115
|
+
collection = super(method, collection, value_method, text_method, options) do |b|
|
116
|
+
content_tag :div, class: "multiple-choice" do
|
117
|
+
b.radio_button + b.label
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
(legend + collection).html_safe
|
122
|
+
end
|
123
|
+
end
|
86
124
|
end
|
87
125
|
|
88
126
|
# The following method will generate revealing panel markup and internally call the
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_elements_form_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alistair Laing
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-01-
|
12
|
+
date: 2018-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.
|
191
|
+
rubygems_version: 2.5.1
|
192
192
|
signing_key:
|
193
193
|
specification_version: 4
|
194
194
|
summary: Ruby on Rails form builder that generates GOV.UK elements styled markup for
|