rails_bootstrap_form 0.5.3 → 0.6.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 +111 -2
- data/Gemfile.lock +9 -3
- data/README.md +68 -0
- data/Rakefile +2 -0
- data/app/assets/stylesheets/rails_bootstrap_form.css +3 -0
- data/demo/app/views/users/_form.html.erb +2 -0
- data/demo/app/views/users/_horizontal_form.html.erb +32 -0
- data/demo/app/views/users/_vertical_form.html.erb +8 -8
- data/demo/config/database.yml +7 -15
- data/demo/db/schema.rb +8 -5
- data/gemfiles/common.gemfile +10 -2
- data/lib/rails_bootstrap_form/bootstrap_form_builder.rb +1 -1
- data/lib/rails_bootstrap_form/bootstrap_form_options.rb +21 -3
- data/lib/rails_bootstrap_form/field_wrapper_builder.rb +31 -17
- data/lib/rails_bootstrap_form/{components → helpers}/check_box.rb +10 -3
- data/lib/rails_bootstrap_form/{components → helpers}/errors.rb +1 -1
- data/lib/rails_bootstrap_form/{components → helpers}/help_text.rb +1 -1
- data/lib/rails_bootstrap_form/{components → helpers}/labels.rb +8 -2
- data/lib/rails_bootstrap_form/{components → helpers}/radio_button.rb +10 -3
- data/lib/rails_bootstrap_form/{components → helpers}/required_field.rb +1 -1
- data/lib/rails_bootstrap_form/helpers.rb +45 -0
- data/lib/rails_bootstrap_form/inputs/base.rb +16 -11
- data/lib/rails_bootstrap_form/inputs/check_box.rb +45 -0
- data/lib/rails_bootstrap_form/inputs/collection_check_boxes.rb +41 -0
- data/lib/rails_bootstrap_form/inputs/collection_radio_buttons.rb +39 -0
- data/lib/rails_bootstrap_form/inputs/collection_select.rb +21 -0
- data/lib/rails_bootstrap_form/inputs/color_field.rb +21 -0
- data/lib/rails_bootstrap_form/inputs/date_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/date_select.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/datetime_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/datetime_local_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/datetime_select.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/email_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/file_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/grouped_collection_select.rb +21 -0
- data/lib/rails_bootstrap_form/inputs/hidden_field.rb +19 -0
- data/lib/rails_bootstrap_form/inputs/month_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/number_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/password_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/phone_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/radio_button.rb +45 -0
- data/lib/rails_bootstrap_form/inputs/range_field.rb +21 -0
- data/lib/rails_bootstrap_form/inputs/search_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/select.rb +21 -0
- data/lib/rails_bootstrap_form/inputs/static_field.rb +30 -0
- data/lib/rails_bootstrap_form/inputs/telephone_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/text_area.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/text_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/time_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/time_select.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/time_zone_select.rb +21 -0
- data/lib/rails_bootstrap_form/inputs/url_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs/week_field.rb +15 -0
- data/lib/rails_bootstrap_form/inputs.rb +62 -209
- data/lib/rails_bootstrap_form/version.rb +1 -1
- data/lib/rails_bootstrap_form.rb +3 -2
- metadata +70 -10
- data/lib/rails_bootstrap_form/components.rb +0 -23
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module TextArea
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
bootstrap_field :text_area
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module TextField
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
bootstrap_field :text_field
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module TimeField
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
bootstrap_field :time_field
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module TimeSelect
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
bootstrap_select_group :time_select
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module TimeZoneSelect
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
def time_zone_select(attribute, priority_zones = nil, options = {}, html_options = {})
|
12
|
+
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)
|
13
|
+
|
14
|
+
field_wrapper_builder(attribute, options, html_options) do
|
15
|
+
super(attribute, priority_zones, options, html_options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module UrlField
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
bootstrap_field :url_field
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# -*- frozen_string_literal: true -*-
|
3
|
+
# -*- warn_indent: true -*-
|
4
|
+
|
5
|
+
module RailsBootstrapForm
|
6
|
+
module Inputs
|
7
|
+
module WeekField
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
bootstrap_field :week_field
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -4,219 +4,72 @@
|
|
4
4
|
|
5
5
|
module RailsBootstrapForm
|
6
6
|
module Inputs
|
7
|
-
|
8
7
|
extend ActiveSupport::Autoload
|
9
8
|
|
10
9
|
autoload :Base
|
10
|
+
autoload :CheckBox
|
11
|
+
autoload :CollectionCheckBoxes
|
12
|
+
autoload :CollectionRadioButtons
|
13
|
+
autoload :CollectionSelect
|
14
|
+
autoload :ColorField
|
15
|
+
autoload :DateField
|
16
|
+
autoload :DateSelect
|
17
|
+
autoload :DatetimeField
|
18
|
+
autoload :DatetimeLocalField
|
19
|
+
autoload :DatetimeSelect
|
20
|
+
autoload :EmailField
|
21
|
+
autoload :FileField
|
22
|
+
autoload :GroupedCollectionSelect
|
23
|
+
autoload :HiddenField
|
24
|
+
autoload :MonthField
|
25
|
+
autoload :NumberField
|
26
|
+
autoload :PasswordField
|
27
|
+
autoload :PhoneField
|
28
|
+
autoload :RadioButton
|
29
|
+
autoload :RangeField
|
30
|
+
autoload :SearchField
|
31
|
+
autoload :Select
|
32
|
+
autoload :StaticField
|
33
|
+
autoload :TelephoneField
|
34
|
+
autoload :TextArea
|
35
|
+
autoload :TextField
|
36
|
+
autoload :TimeField
|
37
|
+
autoload :TimeSelect
|
38
|
+
autoload :TimeZoneSelect
|
39
|
+
autoload :UrlField
|
40
|
+
autoload :WeekField
|
11
41
|
|
12
42
|
include Base
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
DATE_SELECT_HELPERS.each do |field_tag_name|
|
48
|
-
define_method(field_tag_name) do |attribute, options = {}, html_options = {}|
|
49
|
-
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)
|
50
|
-
|
51
|
-
field_wrapper_builder(attribute, options, html_options) do
|
52
|
-
tag.div(class: control_specific_class(field_tag_name)) do
|
53
|
-
super(attribute, options, html_options)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
def select(attribute, choices = nil, options = {}, html_options = {}, &block)
|
60
|
-
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)
|
61
|
-
|
62
|
-
field_wrapper_builder(attribute, options, html_options) do
|
63
|
-
super(attribute, choices, options, html_options, &block)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def collection_select(attribute, collection, value_method, text_method, options = {}, html_options = {})
|
68
|
-
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)
|
69
|
-
|
70
|
-
field_wrapper_builder(attribute, options, html_options) do
|
71
|
-
super(attribute, collection, value_method, text_method, options, html_options)
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def grouped_collection_select(attribute, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
|
76
|
-
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)
|
77
|
-
|
78
|
-
field_wrapper_builder(attribute, options, html_options) do
|
79
|
-
super(attribute, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
def time_zone_select(attribute, priority_zones = nil, options = {}, html_options = {})
|
84
|
-
options = {bootstrap_form: {field_class: "form-select"}}.deep_merge!(options)
|
85
|
-
|
86
|
-
field_wrapper_builder(attribute, options, html_options) do
|
87
|
-
super(attribute, priority_zones, options, html_options)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
def range_field(attribute, options = {})
|
92
|
-
options = {bootstrap_form: {field_class: "form-range"}}.deep_merge!(options)
|
93
|
-
|
94
|
-
field_wrapper_builder(attribute, options) do
|
95
|
-
super(attribute, options)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
def color_field(attribute, options = {})
|
100
|
-
options = {bootstrap_form: {field_class: "form-control form-control-color"}}.deep_merge!(options)
|
101
|
-
|
102
|
-
field_wrapper_builder(attribute, options) do
|
103
|
-
super(attribute, options)
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
def hidden_field(attribute, options = {})
|
108
|
-
options[:value] = object.send(attribute) unless options.key?(:value)
|
109
|
-
|
110
|
-
super(attribute, options)
|
111
|
-
end
|
112
|
-
|
113
|
-
def static_field(*args)
|
114
|
-
options = args.extract_options!
|
115
|
-
attribute = args.first
|
116
|
-
|
117
|
-
static_options = options.merge(
|
118
|
-
readonly: true,
|
119
|
-
disabled: true,
|
120
|
-
bootstrap_form: {
|
121
|
-
field_class: bootstrap_form_options.static_field_class
|
122
|
-
}
|
123
|
-
)
|
124
|
-
|
125
|
-
static_options[:value] = object.send(attribute) unless options.key?(:value)
|
126
|
-
|
127
|
-
text_field(attribute, static_options)
|
128
|
-
end
|
129
|
-
|
130
|
-
def check_box(attribute, options = {}, checked_value = "1", unchecked_value = "0", &block)
|
131
|
-
bootstrap_options = bootstrap_form_options.scoped(options.delete(:bootstrap_form))
|
132
|
-
|
133
|
-
options[:class] = check_box_classes(attribute, options)
|
134
|
-
|
135
|
-
check_box_field = super(attribute, options, checked_value, unchecked_value)
|
136
|
-
check_box_help_text = help_text(attribute, bootstrap_options)
|
137
|
-
|
138
|
-
check_box_label = check_box_label(attribute, checked_value, options, bootstrap_options, &block)
|
139
|
-
|
140
|
-
check_box_html = tag.div(**check_box_wrapper_options(bootstrap_options)) do
|
141
|
-
concat(check_box_field)
|
142
|
-
concat(check_box_label)
|
143
|
-
concat(check_box_help_text) unless bootstrap_options.inline?
|
144
|
-
concat(generate_error(attribute)) if is_invalid?(attribute) && !bootstrap_options.inline?
|
145
|
-
end
|
146
|
-
|
147
|
-
check_box_html
|
148
|
-
end
|
149
|
-
|
150
|
-
def radio_button(attribute, value, options = {})
|
151
|
-
bootstrap_options = bootstrap_form_options.scoped(options.delete(:bootstrap_form))
|
152
|
-
|
153
|
-
options[:class] = radio_button_classes(attribute, options)
|
154
|
-
|
155
|
-
radio_button_field = super(attribute, value, options)
|
156
|
-
radio_button_help_text = help_text(attribute, bootstrap_options)
|
157
|
-
|
158
|
-
radio_button_label = radio_button_label(attribute, value, options, bootstrap_options)
|
159
|
-
|
160
|
-
radio_button_html = tag.div(**radio_button_wrapper_options(bootstrap_options)) do
|
161
|
-
concat(radio_button_field)
|
162
|
-
concat(radio_button_label)
|
163
|
-
concat(radio_button_help_text) unless bootstrap_options.inline?
|
164
|
-
concat(generate_error(attribute)) if is_invalid?(attribute) && !bootstrap_options.inline?
|
165
|
-
end
|
166
|
-
|
167
|
-
radio_button_html
|
168
|
-
end
|
169
|
-
|
170
|
-
def collection_check_boxes(attribute, collection, value_method, text_method, options = {}, html_options = {}, &block)
|
171
|
-
options[:multiple] = true
|
172
|
-
|
173
|
-
inputs = ActiveSupport::SafeBuffer.new
|
174
|
-
|
175
|
-
collection.each do |object|
|
176
|
-
input_value = value_method.respond_to?(:call) ? value_method.call(object) : object.send(value_method)
|
177
|
-
input_options = {
|
178
|
-
bootstrap_form: {
|
179
|
-
label_text: text_method.respond_to?(:call) ? text_method.call(object) : object.send(text_method)
|
180
|
-
}
|
181
|
-
}.deep_merge!(options)
|
182
|
-
|
183
|
-
inputs << check_box(attribute, input_options, input_value, nil)
|
184
|
-
end
|
185
|
-
|
186
|
-
if options.delete(:include_hidden) { true }
|
187
|
-
inputs.prepend hidden_field(attribute, value: "", multiple: true)
|
188
|
-
end
|
189
|
-
|
190
|
-
field_wrapper_builder(attribute, options, html_options) do
|
191
|
-
concat(tag.div(class: control_specific_class(:collection_check_boxes)) do
|
192
|
-
concat(inputs)
|
193
|
-
end)
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
def collection_radio_buttons(attribute, collection, value_method, text_method, options = {}, html_options = {}, &block)
|
198
|
-
inputs = ActiveSupport::SafeBuffer.new
|
199
|
-
|
200
|
-
collection.each do |object|
|
201
|
-
input_value = value_method.respond_to?(:call) ? value_method.call(object) : object.send(value_method)
|
202
|
-
input_options = {
|
203
|
-
bootstrap_form: {
|
204
|
-
label_text: text_method.respond_to?(:call) ? text_method.call(object) : object.send(text_method)
|
205
|
-
}
|
206
|
-
}.deep_merge!(options)
|
207
|
-
|
208
|
-
if (checked = input_options[:checked])
|
209
|
-
input_options[:checked] = collection_input_checked?(checked, object, object.send(value_method))
|
210
|
-
end
|
211
|
-
|
212
|
-
inputs << radio_button(attribute, input_value, input_options)
|
213
|
-
end
|
214
|
-
|
215
|
-
field_wrapper_builder(attribute, options, html_options) do
|
216
|
-
concat(tag.div(class: control_specific_class(:collection_radio_buttons)) do
|
217
|
-
concat(inputs)
|
218
|
-
end)
|
219
|
-
end
|
220
|
-
end
|
43
|
+
include CheckBox
|
44
|
+
include CollectionCheckBoxes
|
45
|
+
include CollectionRadioButtons
|
46
|
+
include CollectionSelect
|
47
|
+
include ColorField
|
48
|
+
include DateField
|
49
|
+
include DateSelect
|
50
|
+
include DatetimeField
|
51
|
+
include DatetimeLocalField
|
52
|
+
include DatetimeSelect
|
53
|
+
include EmailField
|
54
|
+
include FileField
|
55
|
+
include GroupedCollectionSelect
|
56
|
+
include HiddenField
|
57
|
+
include MonthField
|
58
|
+
include NumberField
|
59
|
+
include PasswordField
|
60
|
+
include PhoneField
|
61
|
+
include RadioButton
|
62
|
+
include RangeField
|
63
|
+
include SearchField
|
64
|
+
include Select
|
65
|
+
include StaticField
|
66
|
+
include TelephoneField
|
67
|
+
include TextArea
|
68
|
+
include TextField
|
69
|
+
include TimeField
|
70
|
+
include TimeSelect
|
71
|
+
include TimeZoneSelect
|
72
|
+
include UrlField
|
73
|
+
include WeekField
|
221
74
|
end
|
222
75
|
end
|
data/lib/rails_bootstrap_form.rb
CHANGED
@@ -13,16 +13,17 @@ module RailsBootstrapForm
|
|
13
13
|
autoload :Configuration
|
14
14
|
autoload :BootstrapFormOptions
|
15
15
|
autoload :BootstrapFormBuilder
|
16
|
-
autoload :Components
|
17
16
|
autoload :FieldWrapperBuilder
|
18
17
|
autoload :InputGroupBuilder
|
19
18
|
autoload :Inputs
|
19
|
+
autoload :Helpers
|
20
20
|
end
|
21
21
|
|
22
22
|
class << self
|
23
23
|
def eager_load!
|
24
24
|
super
|
25
|
-
RailsBootstrapForm::
|
25
|
+
RailsBootstrapForm::Helpers.eager_load!
|
26
|
+
RailsBootstrapForm::Inputs.eager_load!
|
26
27
|
end
|
27
28
|
|
28
29
|
def config
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_bootstrap_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harshal LADHE (shivam091)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: generator_spec
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '7.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '7.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activemodel
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '7.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '7.0'
|
27
55
|
description: Rails form helpers and form builder extensions that make it super easy
|
28
56
|
to build Bootstrap 5 forms.
|
29
57
|
email:
|
@@ -65,6 +93,7 @@ files:
|
|
65
93
|
- demo/app/views/layouts/application.html.erb
|
66
94
|
- demo/app/views/users/_form.html.erb
|
67
95
|
- demo/app/views/users/_form_without_bootstrap_helpers.html.erb
|
96
|
+
- demo/app/views/users/_horizontal_form.html.erb
|
68
97
|
- demo/app/views/users/_vertical_form.html.erb
|
69
98
|
- demo/app/views/users/edit.html.erb
|
70
99
|
- demo/app/views/users/index.html.erb
|
@@ -110,19 +139,50 @@ files:
|
|
110
139
|
- lib/rails_bootstrap_form/action_view_extensions/bootstrap_form_helper.rb
|
111
140
|
- lib/rails_bootstrap_form/bootstrap_form_builder.rb
|
112
141
|
- lib/rails_bootstrap_form/bootstrap_form_options.rb
|
113
|
-
- lib/rails_bootstrap_form/components.rb
|
114
|
-
- lib/rails_bootstrap_form/components/check_box.rb
|
115
|
-
- lib/rails_bootstrap_form/components/errors.rb
|
116
|
-
- lib/rails_bootstrap_form/components/help_text.rb
|
117
|
-
- lib/rails_bootstrap_form/components/labels.rb
|
118
|
-
- lib/rails_bootstrap_form/components/radio_button.rb
|
119
|
-
- lib/rails_bootstrap_form/components/required_field.rb
|
120
142
|
- lib/rails_bootstrap_form/configuration.rb
|
121
143
|
- lib/rails_bootstrap_form/engine.rb
|
122
144
|
- lib/rails_bootstrap_form/field_wrapper_builder.rb
|
145
|
+
- lib/rails_bootstrap_form/helpers.rb
|
146
|
+
- lib/rails_bootstrap_form/helpers/check_box.rb
|
147
|
+
- lib/rails_bootstrap_form/helpers/errors.rb
|
148
|
+
- lib/rails_bootstrap_form/helpers/help_text.rb
|
149
|
+
- lib/rails_bootstrap_form/helpers/labels.rb
|
150
|
+
- lib/rails_bootstrap_form/helpers/radio_button.rb
|
151
|
+
- lib/rails_bootstrap_form/helpers/required_field.rb
|
123
152
|
- lib/rails_bootstrap_form/input_group_builder.rb
|
124
153
|
- lib/rails_bootstrap_form/inputs.rb
|
125
154
|
- lib/rails_bootstrap_form/inputs/base.rb
|
155
|
+
- lib/rails_bootstrap_form/inputs/check_box.rb
|
156
|
+
- lib/rails_bootstrap_form/inputs/collection_check_boxes.rb
|
157
|
+
- lib/rails_bootstrap_form/inputs/collection_radio_buttons.rb
|
158
|
+
- lib/rails_bootstrap_form/inputs/collection_select.rb
|
159
|
+
- lib/rails_bootstrap_form/inputs/color_field.rb
|
160
|
+
- lib/rails_bootstrap_form/inputs/date_field.rb
|
161
|
+
- lib/rails_bootstrap_form/inputs/date_select.rb
|
162
|
+
- lib/rails_bootstrap_form/inputs/datetime_field.rb
|
163
|
+
- lib/rails_bootstrap_form/inputs/datetime_local_field.rb
|
164
|
+
- lib/rails_bootstrap_form/inputs/datetime_select.rb
|
165
|
+
- lib/rails_bootstrap_form/inputs/email_field.rb
|
166
|
+
- lib/rails_bootstrap_form/inputs/file_field.rb
|
167
|
+
- lib/rails_bootstrap_form/inputs/grouped_collection_select.rb
|
168
|
+
- lib/rails_bootstrap_form/inputs/hidden_field.rb
|
169
|
+
- lib/rails_bootstrap_form/inputs/month_field.rb
|
170
|
+
- lib/rails_bootstrap_form/inputs/number_field.rb
|
171
|
+
- lib/rails_bootstrap_form/inputs/password_field.rb
|
172
|
+
- lib/rails_bootstrap_form/inputs/phone_field.rb
|
173
|
+
- lib/rails_bootstrap_form/inputs/radio_button.rb
|
174
|
+
- lib/rails_bootstrap_form/inputs/range_field.rb
|
175
|
+
- lib/rails_bootstrap_form/inputs/search_field.rb
|
176
|
+
- lib/rails_bootstrap_form/inputs/select.rb
|
177
|
+
- lib/rails_bootstrap_form/inputs/static_field.rb
|
178
|
+
- lib/rails_bootstrap_form/inputs/telephone_field.rb
|
179
|
+
- lib/rails_bootstrap_form/inputs/text_area.rb
|
180
|
+
- lib/rails_bootstrap_form/inputs/text_field.rb
|
181
|
+
- lib/rails_bootstrap_form/inputs/time_field.rb
|
182
|
+
- lib/rails_bootstrap_form/inputs/time_select.rb
|
183
|
+
- lib/rails_bootstrap_form/inputs/time_zone_select.rb
|
184
|
+
- lib/rails_bootstrap_form/inputs/url_field.rb
|
185
|
+
- lib/rails_bootstrap_form/inputs/week_field.rb
|
126
186
|
- lib/rails_bootstrap_form/version.rb
|
127
187
|
- sig/rails_bootstrap_form.rbs
|
128
188
|
homepage: https://github.com/shivam091/rails_bootstrap_form
|
@@ -132,7 +192,7 @@ metadata:
|
|
132
192
|
allowed_push_host: https://rubygems.org
|
133
193
|
homepage_uri: https://github.com/shivam091/rails_bootstrap_form
|
134
194
|
source_code_uri: https://github.com/shivam091/rails_bootstrap_form
|
135
|
-
changelog_uri: https://github.com/shivam091/rails_bootstrap_form/CHANGELOG.md
|
195
|
+
changelog_uri: https://github.com/shivam091/rails_bootstrap_form/blob/main/CHANGELOG.md
|
136
196
|
post_install_message:
|
137
197
|
rdoc_options: []
|
138
198
|
require_paths:
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
# -*- frozen_string_literal: true -*-
|
3
|
-
# -*- warn_indent: true -*-
|
4
|
-
|
5
|
-
module RailsBootstrapForm
|
6
|
-
module Components
|
7
|
-
extend ActiveSupport::Autoload
|
8
|
-
|
9
|
-
autoload :HelpText
|
10
|
-
autoload :Labels
|
11
|
-
autoload :RequiredField
|
12
|
-
autoload :Errors
|
13
|
-
autoload :CheckBox
|
14
|
-
autoload :RadioButton
|
15
|
-
|
16
|
-
include HelpText
|
17
|
-
include Labels
|
18
|
-
include RequiredField
|
19
|
-
include Errors
|
20
|
-
include CheckBox
|
21
|
-
include RadioButton
|
22
|
-
end
|
23
|
-
end
|