hackathon_manager 0.6.6 → 0.7.0

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.
Files changed (76) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +7 -1
  3. data/app/assets/javascripts/hackathon_manager/manage/application.js +4 -6
  4. data/app/assets/javascripts/hackathon_manager/manage/lib/datatables.js +82 -0
  5. data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +13 -64
  6. data/app/assets/javascripts/hackathon_manager/vendor/datatables.min.js +290 -0
  7. data/app/assets/stylesheets/hackathon_manager/dashboard.css +109 -0
  8. data/app/assets/stylesheets/hackathon_manager/datatables.min.css +18 -0
  9. data/app/assets/stylesheets/hackathon_manager/manage.sass +64 -47
  10. data/app/controllers/manage/stats_controller.rb +66 -30
  11. data/app/controllers/rsvps_controller.rb +2 -0
  12. data/app/datatables/admin_datatable.rb +3 -3
  13. data/app/datatables/message_datatable.rb +5 -5
  14. data/app/datatables/questionnaire_datatable.rb +6 -5
  15. data/app/datatables/school_datatable.rb +3 -3
  16. data/app/helpers/hackathon_manager_helper.rb +63 -4
  17. data/app/helpers/manage/bootstrap_form_helper.rb +98 -0
  18. data/app/models/bus_list.rb +1 -1
  19. data/app/models/message.rb +3 -3
  20. data/app/models/questionnaire.rb +1 -1
  21. data/app/models/school.rb +10 -4
  22. data/app/models/user.rb +3 -1
  23. data/app/views/application/_triggered_email_summary.html.haml +11 -9
  24. data/app/views/layouts/hackathon_manager/application.html.haml +4 -0
  25. data/app/views/layouts/manage/_flashes.html.haml +4 -0
  26. data/app/views/layouts/manage/_page_title.html.haml +8 -0
  27. data/app/views/layouts/manage/application.html.haml +72 -19
  28. data/app/views/manage/admins/_form.html.haml +4 -5
  29. data/app/views/manage/admins/edit.html.haml +5 -10
  30. data/app/views/manage/admins/index.html.haml +4 -8
  31. data/app/views/manage/admins/new.html.haml +5 -6
  32. data/app/views/manage/admins/show.html.haml +12 -14
  33. data/app/views/manage/bus_lists/_form.html.haml +3 -6
  34. data/app/views/manage/bus_lists/edit.html.haml +3 -7
  35. data/app/views/manage/bus_lists/index.html.haml +16 -23
  36. data/app/views/manage/bus_lists/new.html.haml +2 -5
  37. data/app/views/manage/bus_lists/show.html.haml +78 -66
  38. data/app/views/manage/configs/show.html.haml +31 -27
  39. data/app/views/manage/dashboard/index.html.haml +28 -19
  40. data/app/views/manage/dashboard/map_data.tsv.erb +6 -13
  41. data/app/views/manage/messages/_form.html.haml +3 -3
  42. data/app/views/manage/messages/edit.html.haml +3 -10
  43. data/app/views/manage/messages/index.html.haml +5 -10
  44. data/app/views/manage/messages/new.html.haml +2 -7
  45. data/app/views/manage/messages/show.html.haml +65 -67
  46. data/app/views/manage/questionnaires/_acc_status_badge.html.haml +2 -0
  47. data/app/views/manage/questionnaires/_check_in_badge.html.haml +4 -0
  48. data/app/views/manage/questionnaires/_checkin.html.haml +40 -0
  49. data/app/views/manage/questionnaires/_form.html.haml +21 -21
  50. data/app/views/manage/questionnaires/_history.html.haml +7 -0
  51. data/app/views/manage/questionnaires/_overview.html.haml +126 -0
  52. data/app/views/manage/questionnaires/edit.html.haml +5 -11
  53. data/app/views/manage/questionnaires/index.html.haml +19 -23
  54. data/app/views/manage/questionnaires/new.html.haml +2 -7
  55. data/app/views/manage/questionnaires/show.html.haml +28 -65
  56. data/app/views/manage/schools/_form.html.haml +2 -2
  57. data/app/views/manage/schools/edit.html.haml +5 -11
  58. data/app/views/manage/schools/index.html.haml +4 -8
  59. data/app/views/manage/schools/merge.html.haml +6 -8
  60. data/app/views/manage/schools/new.html.haml +2 -7
  61. data/app/views/manage/schools/show.html.haml +58 -55
  62. data/app/views/manage/stats/index.html.haml +18 -15
  63. data/app/views/questionnaires/_form.html.haml +2 -2
  64. data/config/initializers/simple_form.rb +4 -0
  65. data/config/initializers/simple_form_bootstrap.rb +412 -0
  66. data/config/locales/en.yml +73 -0
  67. data/db/migrate/20180701160855_remove_email_from_questionnaires.rb +5 -0
  68. data/lib/hackathon_manager/version.rb +1 -1
  69. metadata +39 -31
  70. data/app/assets/javascripts/hackathon_manager/vendor/buttons.colVis.min.js +0 -6
  71. data/app/assets/javascripts/hackathon_manager/vendor/buttons.html5.min.js +0 -22
  72. data/app/assets/javascripts/hackathon_manager/vendor/dataTables.buttons.min.js +0 -35
  73. data/app/assets/javascripts/hackathon_manager/vendor/jquery.dataTables.min.js +0 -164
  74. data/app/assets/javascripts/hackathon_manager/vendor/pdfmake.min.js +0 -22
  75. data/app/assets/stylesheets/hackathon_manager/datatables/buttons.dataTables.min.css +0 -1
  76. data/app/assets/stylesheets/hackathon_manager/datatables/jquery.dataTables.min.css +0 -1
@@ -20,8 +20,8 @@
20
20
  = f.input :major, input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
21
21
  = f.input :gender, collection: collection_or_text(@questionnaire.gender, Questionnaire::POSSIBLE_GENDERS), include_blank: "(select one...)", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
22
22
  = f.input :shirt_size, as: :select, collection: Questionnaire::POSSIBLE_SHIRT_SIZES, include_blank: "(select one...)", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
23
- = f.input :dietary_restrictions, as: :text, placeholder: "Allergies, medical assistance, etc.", label: "Health restrictions", wrapper_html: { class: 'input--half' }
24
- = f.input :special_needs, as: :text, placeholder: "Any special needs or requests", label: "Special needs", wrapper_html: { class: 'input--half' }
23
+ = f.input :dietary_restrictions, as: :text, label: "Health restrictions", wrapper_html: { class: 'input--half' }
24
+ = f.input :special_needs, as: :text, label: "Special needs", wrapper_html: { class: 'input--half' }
25
25
 
26
26
  .right
27
27
  %button.button{ type: "button", "data-wizard" => "next" } Next
@@ -27,8 +27,12 @@ SimpleForm.setup do |config|
27
27
  # extensions by default, you can change `b.optional` to `b.use`.
28
28
 
29
29
  # Calculates maxlength from length validations for string inputs
30
+ # and/or database column lengths
30
31
  b.optional :maxlength
31
32
 
33
+ # Calculate minlength from length validations for string inputs
34
+ b.optional :minlength
35
+
32
36
  # Calculates pattern from format validations for string inputs
33
37
  b.optional :pattern
34
38
 
@@ -0,0 +1,412 @@
1
+ # frozen_string_literal: true
2
+
3
+ # rubocop:disable all
4
+
5
+ # Please do not make direct changes to this file!
6
+ # This generator is maintained by the community around simple_form-bootstrap:
7
+ # https://github.com/rafaelfranca/simple_form-bootstrap
8
+ # All future development, tests, and organization should happen there.
9
+ # Background history: https://github.com/plataformatec/simple_form/issues/1561
10
+
11
+ # Uncomment this and change the path if necessary to include your own
12
+ # components.
13
+ # See https://github.com/plataformatec/simple_form#custom-components
14
+ # to know more about custom components.
15
+ Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
16
+
17
+ # Use this setup block to configure all options available in SimpleForm.
18
+ SimpleForm.setup do |config|
19
+ # General config moved to app/helpers/manage/boostrap_form_helper.rb
20
+
21
+ # vertical forms
22
+ #
23
+ # vertical default_wrapper
24
+ config.wrappers :bootstrap_vertical_form, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
25
+ b.use :html5
26
+ b.use :placeholder
27
+ b.optional :maxlength
28
+ b.optional :minlength
29
+ b.optional :pattern
30
+ b.optional :min_max
31
+ b.optional :readonly
32
+ b.use :label, class: 'form-control-label'
33
+ b.use :input, class: 'form-control', error_class: 'is-invalid'
34
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
35
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
36
+ end
37
+
38
+ # vertical input for boolean
39
+ config.wrappers :bootstrap_vertical_boolean, tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
40
+ b.use :html5
41
+ b.optional :readonly
42
+ b.wrapper :form_check_wrapper, tag: 'div', class: 'form-check' do |bb|
43
+ bb.use :input, class: 'form-check-input', error_class: 'is-invalid'
44
+ bb.use :label, class: 'form-check-label'
45
+ bb.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
46
+ bb.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
47
+ end
48
+ end
49
+
50
+ # vertical input for radio buttons and check boxes
51
+ config.wrappers :bootstrap_vertical_collection, item_wrapper_class: 'form-check', tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
52
+ b.use :html5
53
+ b.optional :readonly
54
+ b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
55
+ ba.use :label_text
56
+ end
57
+ b.use :input, class: 'form-check-input', error_class: 'is-invalid'
58
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
59
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
60
+ end
61
+
62
+ # vertical input for inline radio buttons and check boxes
63
+ config.wrappers :bootstrap_vertical_collection_inline, item_wrapper_class: 'form-check form-check-inline', tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
64
+ b.use :html5
65
+ b.optional :readonly
66
+ b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
67
+ ba.use :label_text
68
+ end
69
+ b.use :input, class: 'form-check-input', error_class: 'is-invalid'
70
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
71
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
72
+ end
73
+
74
+ # vertical file input
75
+ config.wrappers :bootstrap_vertical_file, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
76
+ b.use :html5
77
+ b.use :placeholder
78
+ b.optional :maxlength
79
+ b.optional :minlength
80
+ b.optional :readonly
81
+ b.use :label
82
+ b.use :input, class: 'form-control-file', error_class: 'is-invalid'
83
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
84
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
85
+ end
86
+
87
+ # vertical multi select
88
+ config.wrappers :bootstrap_vertical_multi_select, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
89
+ b.use :html5
90
+ b.optional :readonly
91
+ b.use :label, class: 'form-control-label'
92
+ b.wrapper tag: 'div', class: 'd-flex flex-row justify-content-between align-items-center' do |ba|
93
+ ba.use :input, class: 'form-control mx-1', error_class: 'is-invalid'
94
+ end
95
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
96
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
97
+ end
98
+
99
+ # vertical range input
100
+ config.wrappers :bootstrap_vertical_range, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
101
+ b.use :html5
102
+ b.use :placeholder
103
+ b.optional :readonly
104
+ b.optional :step
105
+ b.use :label
106
+ b.use :input, class: 'form-control-range', error_class: 'is-invalid'
107
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
108
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
109
+ end
110
+
111
+
112
+ # horizontal forms
113
+ #
114
+ # horizontal default_wrapper
115
+ config.wrappers :bootstrap_horizontal_form, tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
116
+ b.use :html5
117
+ b.use :placeholder
118
+ b.optional :maxlength
119
+ b.optional :minlength
120
+ b.optional :pattern
121
+ b.optional :min_max
122
+ b.optional :readonly
123
+ b.use :label, class: 'col-sm-3 col-form-label'
124
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba|
125
+ ba.use :input, class: 'form-control', error_class: 'is-invalid'
126
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
127
+ ba.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
128
+ end
129
+ end
130
+
131
+ # horizontal input for boolean
132
+ config.wrappers :bootstrap_horizontal_boolean, tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
133
+ b.use :html5
134
+ b.optional :readonly
135
+ b.wrapper tag: 'label', class: 'col-sm-3' do |ba|
136
+ ba.use :label_text
137
+ end
138
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |wr|
139
+ wr.wrapper :form_check_wrapper, tag: 'div', class: 'form-check' do |bb|
140
+ bb.use :input, class: 'form-check-input', error_class: 'is-invalid'
141
+ bb.use :label, class: 'form-check-label'
142
+ bb.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
143
+ bb.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
144
+ end
145
+ end
146
+ end
147
+
148
+ # horizontal input for radio buttons and check boxes
149
+ config.wrappers :bootstrap_horizontal_collection, item_wrapper_class: 'form-check', tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
150
+ b.use :html5
151
+ b.optional :readonly
152
+ b.use :label, class: 'col-sm-3 form-control-label'
153
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba|
154
+ ba.use :input, class: 'form-check-input', error_class: 'is-invalid'
155
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
156
+ ba.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
157
+ end
158
+ end
159
+
160
+ # horizontal input for inline radio buttons and check boxes
161
+ config.wrappers :bootstrap_horizontal_collection_inline, item_wrapper_class: 'form-check form-check-inline', tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
162
+ b.use :html5
163
+ b.optional :readonly
164
+ b.use :label, class: 'col-sm-3 form-control-label'
165
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba|
166
+ ba.use :input, class: 'form-check-input', error_class: 'is-invalid'
167
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
168
+ ba.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
169
+ end
170
+ end
171
+
172
+ # horizontal file input
173
+ config.wrappers :bootstrap_horizontal_file, tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
174
+ b.use :html5
175
+ b.use :placeholder
176
+ b.optional :maxlength
177
+ b.optional :minlength
178
+ b.optional :readonly
179
+ b.use :label, class: 'col-sm-3 form-control-label'
180
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba|
181
+ ba.use :input, error_class: 'is-invalid'
182
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
183
+ ba.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
184
+ end
185
+ end
186
+
187
+ # horizontal multi select
188
+ config.wrappers :bootstrap_horizontal_multi_select, tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
189
+ b.use :html5
190
+ b.optional :readonly
191
+ b.use :label, class: 'col-sm-3 control-label'
192
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba|
193
+ ba.wrapper tag: 'div', class: 'd-flex flex-row justify-content-between align-items-center' do |bb|
194
+ bb.use :input, class: 'form-control mx-1', error_class: 'is-invalid'
195
+ end
196
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
197
+ ba.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
198
+ end
199
+ end
200
+
201
+ # horizontal range input
202
+ config.wrappers :bootstrap_horizontal_range, tag: 'div', class: 'form-group row', error_class: 'form-group-invalid' do |b|
203
+ b.use :html5
204
+ b.use :placeholder
205
+ b.optional :readonly
206
+ b.optional :step
207
+ b.use :label, class: 'col-sm-3 form-control-label'
208
+ b.wrapper :grid_wrapper, tag: 'div', class: 'col-sm-9' do |ba|
209
+ ba.use :input, class: 'form-control-range', error_class: 'is-invalid'
210
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
211
+ ba.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
212
+ end
213
+ end
214
+
215
+
216
+ # inline forms
217
+ #
218
+ # inline default_wrapper
219
+ config.wrappers :bootstrap_inline_form, tag: 'span', error_class: 'form-group-invalid' do |b|
220
+ b.use :html5
221
+ b.use :placeholder
222
+ b.optional :maxlength
223
+ b.optional :minlength
224
+ b.optional :pattern
225
+ b.optional :min_max
226
+ b.optional :readonly
227
+ b.use :label, class: 'sr-only'
228
+
229
+ b.use :input, class: 'form-control', error_class: 'is-invalid'
230
+ b.use :error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
231
+ b.optional :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
232
+ end
233
+
234
+ # inline input for boolean
235
+ config.wrappers :bootstrap_inline_boolean, tag: 'span', class: 'form-check flex-wrap justify-content-start mr-sm-2', error_class: 'form-group-invalid' do |b|
236
+ b.use :html5
237
+ b.optional :readonly
238
+ b.use :input, class: 'form-check-input', error_class: 'is-invalid'
239
+ b.use :label, class: 'form-check-label'
240
+ b.use :error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
241
+ b.optional :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
242
+ end
243
+
244
+
245
+ # bootstrap custom forms
246
+ #
247
+ # custom input for boolean
248
+ config.wrappers :bootstrap_custom_boolean, tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
249
+ b.use :html5
250
+ b.optional :readonly
251
+ b.wrapper :form_check_wrapper, tag: 'div', class: 'custom-control custom-checkbox' do |bb|
252
+ bb.use :input, class: 'custom-control-input', error_class: 'is-invalid'
253
+ bb.use :label, class: 'custom-control-label'
254
+ bb.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
255
+ bb.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
256
+ end
257
+ end
258
+
259
+ config.wrappers :bootstrap_custom_boolean_switch, tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
260
+ b.use :html5
261
+ b.optional :readonly
262
+ b.wrapper :form_check_wrapper, tag: 'div', class: 'custom-control custom-checkbox-switch' do |bb|
263
+ bb.use :input, class: 'custom-control-input', error_class: 'is-invalid'
264
+ bb.use :label, class: 'custom-control-label'
265
+ bb.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
266
+ bb.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
267
+ end
268
+ end
269
+
270
+ # custom input for radio buttons and check boxes
271
+ config.wrappers :bootstrap_custom_collection, item_wrapper_class: 'custom-control', tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
272
+ b.use :html5
273
+ b.optional :readonly
274
+ b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
275
+ ba.use :label_text
276
+ end
277
+ b.use :input, class: 'custom-control-input', error_class: 'is-invalid'
278
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
279
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
280
+ end
281
+
282
+ # custom input for inline radio buttons and check boxes
283
+ config.wrappers :bootstrap_custom_collection_inline, item_wrapper_class: 'custom-control custom-control-inline', tag: 'fieldset', class: 'form-group', error_class: 'form-group-invalid' do |b|
284
+ b.use :html5
285
+ b.optional :readonly
286
+ b.wrapper :legend_tag, tag: 'legend', class: 'col-form-label pt-0' do |ba|
287
+ ba.use :label_text
288
+ end
289
+ b.use :input, class: 'custom-control-input', error_class: 'is-invalid'
290
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
291
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
292
+ end
293
+
294
+ # custom file input
295
+ config.wrappers :bootstrap_custom_file, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
296
+ b.use :html5
297
+ b.use :placeholder
298
+ b.optional :maxlength
299
+ b.optional :minlength
300
+ b.optional :readonly
301
+ b.use :label, class: 'form-control-label'
302
+ b.wrapper :custom_file_wrapper, tag: 'div', class: 'custom-file' do |ba|
303
+ ba.use :input, class: 'custom-file-input', error_class: 'is-invalid'
304
+ ba.use :label, class: 'custom-file-label'
305
+ ba.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
306
+ end
307
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
308
+ end
309
+
310
+ # custom multi select
311
+ config.wrappers :bootstrap_custom_multi_select, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
312
+ b.use :html5
313
+ b.optional :readonly
314
+ b.use :label, class: 'form-control-label'
315
+ b.wrapper tag: 'div', class: 'd-flex flex-row justify-content-between align-items-center' do |ba|
316
+ ba.use :input, class: 'custom-select mx-1', error_class: 'is-invalid'
317
+ end
318
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
319
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
320
+ end
321
+
322
+ # custom range input
323
+ config.wrappers :bootstrap_custom_range, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
324
+ b.use :html5
325
+ b.use :placeholder
326
+ b.optional :readonly
327
+ b.optional :step
328
+ b.use :label, class: 'form-control-label'
329
+ b.use :input, class: 'custom-range', error_class: 'is-invalid'
330
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
331
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
332
+ end
333
+
334
+
335
+ # Input Group - custom component
336
+ # see example app and config at https://github.com/rafaelfranca/simple_form-bootstrap
337
+ config.wrappers :bootstrap_input_group, tag: 'div', class: 'form-group', error_class: 'form-group-invalid' do |b|
338
+ b.use :html5
339
+ b.use :placeholder
340
+ b.optional :maxlength
341
+ b.optional :minlength
342
+ b.optional :pattern
343
+ b.optional :min_max
344
+ b.optional :readonly
345
+ b.use :label, class: 'form-control-label'
346
+ b.wrapper :input_group_tag, tag: 'div', class: 'input-group' do |ba|
347
+ ba.optional :prepend
348
+ ba.use :input, class: 'form-control', error_class: 'is-invalid'
349
+ ba.optional :append
350
+ end
351
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback d-block' }
352
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
353
+ end
354
+
355
+
356
+ # Floating Labels form
357
+ #
358
+ # floating labels default_wrapper
359
+ config.wrappers :bootstrap_floating_labels_form, tag: 'div', class: 'form-label-group', error_class: 'form-group-invalid' do |b|
360
+ b.use :html5
361
+ b.use :placeholder
362
+ b.optional :maxlength
363
+ b.optional :minlength
364
+ b.optional :pattern
365
+ b.optional :min_max
366
+ b.optional :readonly
367
+ b.use :input, class: 'form-control', error_class: 'is-invalid'
368
+ b.use :label, class: 'form-control-label'
369
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
370
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
371
+ end
372
+
373
+ # custom multi select
374
+ config.wrappers :bootstrap_floating_labels_select, tag: 'div', class: 'form-label-group', error_class: 'form-group-invalid' do |b|
375
+ b.use :html5
376
+ b.optional :readonly
377
+ b.use :input, class: 'custom-select custom-select-lg', error_class: 'is-invalid'
378
+ b.use :label, class: 'form-control-label'
379
+ b.use :full_error, wrap_with: { tag: 'div', class: 'invalid-feedback' }
380
+ b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
381
+ end
382
+
383
+
384
+ # # The default wrapper to be used by the FormBuilder.
385
+ # config.default_wrapper = :vertical_form
386
+
387
+ # # Custom wrappers for input types. This should be a hash containing an input
388
+ # # type as key and the wrapper that will be used for all inputs with specified type.
389
+ # config.wrapper_mappings = {
390
+ # boolean: :vertical_boolean,
391
+ # check_boxes: :vertical_collection,
392
+ # date: :vertical_multi_select,
393
+ # datetime: :vertical_multi_select,
394
+ # file: :vertical_file,
395
+ # radio_buttons: :vertical_collection,
396
+ # range: :vertical_range,
397
+ # time: :vertical_multi_select
398
+ # }
399
+
400
+ # enable custom form wrappers
401
+ # config.wrapper_mappings = {
402
+ # boolean: :custom_boolean,
403
+ # check_boxes: :custom_collection,
404
+ # date: :custom_multi_select,
405
+ # datetime: :custom_multi_select,
406
+ # file: :custom_file,
407
+ # radio_buttons: :custom_collection,
408
+ # range: :custom_range,
409
+ # time: :custom_multi_select
410
+ # }
411
+ end
412
+ # rubocop:enable all
@@ -0,0 +1,73 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at http://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ simple_form:
34
+ hints:
35
+ bus_list:
36
+ capacity: Sign-ups will be disabled once this limit is reached. To disable, set to 1000.
37
+ needs_bus_captain: |
38
+ Allows applicants to indicate their interest in being a bus captain when they RSVP.<br />
39
+ If many people have already RSVP'd, consider sending a message out to this bus list asking for interest as well.
40
+ notes: Notes are shared with applicants. Supports Markdown and HTML.
41
+ user:
42
+ admin_limited_access: Limited access prevents the admin from adding, modifying, or deleting any records. Modifications through the check-in process are allowed.
43
+ placeholders:
44
+ bus_list:
45
+ notes: |
46
+ Notes help communicate bus plans to attendees. Example below:
47
+
48
+ **Pickup locations:**
49
+
50
+ 7:00am - **New University**, 123 Main St, City, State, zip
51
+
52
+ 8:30am - **Other University**, Engineering Building, some verbal description.
53
+
54
+ Busses depart My School at 5:00pm on Sunday.
55
+
56
+ **Questions?**
57
+
58
+ Contact [travel@example.com](mailto:travel@example.com)
59
+ questionnaire:
60
+ first_name: Joe
61
+ last_name: Smith
62
+ email: joe@example.com
63
+ phone: (123) 456-7890
64
+ school_id: My University
65
+ level_of_study: University (Undergraduate)
66
+ major: Major
67
+ gender: Female, Male, Non-Binary, Prefer not to say, other
68
+ dietary_restrictions: Allergies, medical assistance, etc.
69
+ special_needs: Any special needs or requests
70
+ portfolio_url: https://mywebsite.com
71
+ vcs_url: https://github.com/coderit
72
+ user:
73
+ email: joe@example.com