formstrap 0.1.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 (180) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +33 -0
  4. data/CHANGELOG.md +1 -0
  5. data/CODE_OF_CONDUCT.md +84 -0
  6. data/Gemfile +28 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +118 -0
  9. data/Rakefile +10 -0
  10. data/app/assets/config/headmin_manifest.js +2 -0
  11. data/app/assets/images/avatar.jpg +0 -0
  12. data/app/assets/images/document.docx +0 -0
  13. data/app/assets/images/document.pdf +0 -0
  14. data/app/assets/images/image.jpg +0 -0
  15. data/app/assets/images/spreadsheet.xls +0 -0
  16. data/app/assets/images/video.mp4 +0 -0
  17. data/app/assets/javascripts/formstrap/config/i18n.js +11 -0
  18. data/app/assets/javascripts/formstrap/controllers/autocomplete_controller.js +318 -0
  19. data/app/assets/javascripts/formstrap/controllers/date_range_controller.js +38 -0
  20. data/app/assets/javascripts/formstrap/controllers/dropzone_controller.js +31 -0
  21. data/app/assets/javascripts/formstrap/controllers/file_preview_controller.js +244 -0
  22. data/app/assets/javascripts/formstrap/controllers/flatpickr_controller.js +35 -0
  23. data/app/assets/javascripts/formstrap/controllers/infinite_scroller_controller.js +28 -0
  24. data/app/assets/javascripts/formstrap/controllers/media_controller.js +252 -0
  25. data/app/assets/javascripts/formstrap/controllers/media_modal_controller.js +147 -0
  26. data/app/assets/javascripts/formstrap/controllers/redactorx_controller.js +40 -0
  27. data/app/assets/javascripts/formstrap/controllers/repeater_controller.js +148 -0
  28. data/app/assets/javascripts/formstrap/controllers/select_controller.js +49 -0
  29. data/app/assets/javascripts/formstrap/controllers/textarea_controller.js +48 -0
  30. data/app/assets/javascripts/formstrap/index.js +32 -0
  31. data/app/assets/javascripts/formstrap.js +11515 -0
  32. data/app/assets/stylesheets/formstrap/forms/autocomplete.scss +27 -0
  33. data/app/assets/stylesheets/formstrap/forms/file.scss +83 -0
  34. data/app/assets/stylesheets/formstrap/forms/media.scss +10 -0
  35. data/app/assets/stylesheets/formstrap/forms/repeater.scss +62 -0
  36. data/app/assets/stylesheets/formstrap/forms/search.scss +12 -0
  37. data/app/assets/stylesheets/formstrap/forms.scss +12 -0
  38. data/app/assets/stylesheets/formstrap/general.scss +18 -0
  39. data/app/assets/stylesheets/formstrap/media/index.scss +9 -0
  40. data/app/assets/stylesheets/formstrap/media.scss +1 -0
  41. data/app/assets/stylesheets/formstrap/utilities/buttons.scss +27 -0
  42. data/app/assets/stylesheets/formstrap/utilities/dropzone.scss +72 -0
  43. data/app/assets/stylesheets/formstrap/utilities.scss +2 -0
  44. data/app/assets/stylesheets/formstrap/vendor/flatpickr.css +903 -0
  45. data/app/assets/stylesheets/formstrap/vendor/tom-select-bootstrap.scss +535 -0
  46. data/app/assets/stylesheets/formstrap.css +1559 -0
  47. data/app/assets/stylesheets/formstrap.scss +11 -0
  48. data/app/controllers/concerns/formstrap/pagination.rb +27 -0
  49. data/app/controllers/formstrap/media_controller.rb +68 -0
  50. data/app/controllers/formstrap_controller.rb +2 -0
  51. data/app/models/concerns/formstrap/autocompletable.rb +36 -0
  52. data/app/models/concerns/formstrap/hintable.rb +22 -0
  53. data/app/models/concerns/formstrap/input_groupable.rb +21 -0
  54. data/app/models/concerns/formstrap/labelable.rb +31 -0
  55. data/app/models/concerns/formstrap/listable.rb +26 -0
  56. data/app/models/concerns/formstrap/placeholderable.rb +11 -0
  57. data/app/models/concerns/formstrap/validatable.rb +38 -0
  58. data/app/models/concerns/formstrap/wrappable.rb +19 -0
  59. data/app/models/formstrap/.DS_Store +0 -0
  60. data/app/models/formstrap/association_view.rb +100 -0
  61. data/app/models/formstrap/blocks_view.rb +43 -0
  62. data/app/models/formstrap/checkbox_view.rb +50 -0
  63. data/app/models/formstrap/color_view.rb +45 -0
  64. data/app/models/formstrap/date_range_view.rb +23 -0
  65. data/app/models/formstrap/date_view.rb +43 -0
  66. data/app/models/formstrap/datetime_range_view.rb +23 -0
  67. data/app/models/formstrap/datetime_view.rb +43 -0
  68. data/app/models/formstrap/email_view.rb +46 -0
  69. data/app/models/formstrap/file_view.rb +106 -0
  70. data/app/models/formstrap/flatpickr_range_view.rb +89 -0
  71. data/app/models/formstrap/flatpickr_view.rb +27 -0
  72. data/app/models/formstrap/hidden_view.rb +8 -0
  73. data/app/models/formstrap/hint_view.rb +4 -0
  74. data/app/models/formstrap/input_group_view.rb +17 -0
  75. data/app/models/formstrap/label_view.rb +22 -0
  76. data/app/models/formstrap/media_item_view.rb +41 -0
  77. data/app/models/formstrap/media_view.rb +143 -0
  78. data/app/models/formstrap/number_view.rb +47 -0
  79. data/app/models/formstrap/password_view.rb +42 -0
  80. data/app/models/formstrap/redactorx_view.rb +57 -0
  81. data/app/models/formstrap/search_view.rb +46 -0
  82. data/app/models/formstrap/select_view.rb +61 -0
  83. data/app/models/formstrap/switch_view.rb +21 -0
  84. data/app/models/formstrap/text_view.rb +46 -0
  85. data/app/models/formstrap/textarea_view.rb +47 -0
  86. data/app/models/formstrap/url_view.rb +46 -0
  87. data/app/models/formstrap/wrapper_view.rb +17 -0
  88. data/app/models/formstrap/wysiwyg_view.rb +15 -0
  89. data/app/models/view_model.rb +62 -0
  90. data/app/views/formstrap/_association.html.erb +30 -0
  91. data/app/views/formstrap/_autocomplete.html.erb +11 -0
  92. data/app/views/formstrap/_blocks.html.erb +45 -0
  93. data/app/views/formstrap/_checkbox.html.erb +34 -0
  94. data/app/views/formstrap/_color.html.erb +32 -0
  95. data/app/views/formstrap/_datalist.html.erb +3 -0
  96. data/app/views/formstrap/_date.html.erb +41 -0
  97. data/app/views/formstrap/_date_range.html.erb +40 -0
  98. data/app/views/formstrap/_datetime.html.erb +41 -0
  99. data/app/views/formstrap/_datetime_range.html.erb +40 -0
  100. data/app/views/formstrap/_email.html.erb +43 -0
  101. data/app/views/formstrap/_errors.html.erb +19 -0
  102. data/app/views/formstrap/_file.html.erb +94 -0
  103. data/app/views/formstrap/_flatpickr.html.erb +33 -0
  104. data/app/views/formstrap/_flatpickr_range.html.erb +40 -0
  105. data/app/views/formstrap/_hidden.html.erb +23 -0
  106. data/app/views/formstrap/_hint.html.erb +21 -0
  107. data/app/views/formstrap/_input_group.html.erb +21 -0
  108. data/app/views/formstrap/_label.html.erb +22 -0
  109. data/app/views/formstrap/_media.html.erb +60 -0
  110. data/app/views/formstrap/_number.html.erb +41 -0
  111. data/app/views/formstrap/_password.html.erb +39 -0
  112. data/app/views/formstrap/_redactorx.html.erb +31 -0
  113. data/app/views/formstrap/_repeater.html.erb +128 -0
  114. data/app/views/formstrap/_search.html.erb +43 -0
  115. data/app/views/formstrap/_select.html.erb +43 -0
  116. data/app/views/formstrap/_switch.html.erb +29 -0
  117. data/app/views/formstrap/_text.html.erb +42 -0
  118. data/app/views/formstrap/_textarea.html.erb +39 -0
  119. data/app/views/formstrap/_to_ary.html.erb +0 -0
  120. data/app/views/formstrap/_url.html.erb +43 -0
  121. data/app/views/formstrap/_validation.html.erb +18 -0
  122. data/app/views/formstrap/_wrapper.html.erb +8 -0
  123. data/app/views/formstrap/_wysiwyg.html.erb +28 -0
  124. data/app/views/formstrap/autocomplete/_item.html.erb +3 -0
  125. data/app/views/formstrap/autocomplete/_list.html.erb +3 -0
  126. data/app/views/formstrap/blocks/_modal.html.erb +20 -0
  127. data/app/views/formstrap/fields/_base.html.erb +25 -0
  128. data/app/views/formstrap/fields/_file.html.erb +17 -0
  129. data/app/views/formstrap/fields/_files.html.erb +17 -0
  130. data/app/views/formstrap/fields/_group.html.erb +52 -0
  131. data/app/views/formstrap/fields/_list.html.erb +31 -0
  132. data/app/views/formstrap/fields/_text.html.erb +17 -0
  133. data/app/views/formstrap/media/_item.html.erb +38 -0
  134. data/app/views/formstrap/media/_media_item_modal.html.erb +77 -0
  135. data/app/views/formstrap/media/_modal.html.erb +40 -0
  136. data/app/views/formstrap/media/_thumbnail.html.erb +20 -0
  137. data/app/views/formstrap/media/_validation.html.erb +10 -0
  138. data/app/views/formstrap/media/create.turbo_stream.erb +5 -0
  139. data/app/views/formstrap/media/index.html.erb +3 -0
  140. data/app/views/formstrap/media/index.turbo_stream.erb +11 -0
  141. data/app/views/formstrap/media/show.html.erb +9 -0
  142. data/app/views/formstrap/media/thumbnail.html.erb +3 -0
  143. data/app/views/formstrap/media/update.turbo_stream.erb +3 -0
  144. data/app/views/formstrap/pagination/_infinite.html.erb +7 -0
  145. data/app/views/formstrap/repeater/_row.html.erb +53 -0
  146. data/app/views/formstrap/shared/_notifications.html.erb +20 -0
  147. data/app/views/formstrap/shared/_popup.html.erb +32 -0
  148. data/app/views/formstrap/shared/_thumbnail.html.erb +35 -0
  149. data/bin/console +14 -0
  150. data/bin/setup +8 -0
  151. data/config/importmap.rb +2 -0
  152. data/config/locales/activerecord/en.yml +12 -0
  153. data/config/locales/activerecord/nl.yml +13 -0
  154. data/config/locales/defaults/en.yml +215 -0
  155. data/config/locales/defaults/nl.yml +213 -0
  156. data/config/locales/devise/en.yml +65 -0
  157. data/config/locales/devise/nl.yml +85 -0
  158. data/config/locales/en.yml +6 -0
  159. data/config/locales/formstrap/forms/en.yml +39 -0
  160. data/config/locales/formstrap/forms/nl.yml +39 -0
  161. data/config/locales/formstrap/media/en.yml +24 -0
  162. data/config/locales/formstrap/media/nl.yml +24 -0
  163. data/config/locales/formstrap/thumbnail/en.yml +4 -0
  164. data/config/locales/formstrap/thumbnail/nl.yml +4 -0
  165. data/config/locales/nl.yml +6 -0
  166. data/config/routes.rb +11 -0
  167. data/esbuild-css.js +25 -0
  168. data/esbuild-js.js +11 -0
  169. data/formstrap.gemspec +37 -0
  170. data/formstrap.iml +34 -0
  171. data/lib/formstrap/engine.rb +27 -0
  172. data/lib/formstrap/form_builder.rb +177 -0
  173. data/lib/formstrap/form_helper.rb +19 -0
  174. data/lib/formstrap/version.rb +3 -0
  175. data/lib/formstrap.rb +6 -0
  176. data/package.json +54 -0
  177. data/src/js/formstrap.js +1 -0
  178. data/src/scss/formstrap.scss +1 -0
  179. data/yarn.lock +1998 -0
  180. metadata +224 -0
@@ -0,0 +1,213 @@
1
+ ---
2
+ nl:
3
+ activerecord:
4
+ errors:
5
+ messages:
6
+ record_invalid: 'Validatie mislukt: %{errors}'
7
+ restrict_dependent_destroy:
8
+ has_one: Kan item niet verwijderen omdat %{record} afhankelijk is
9
+ has_many: Kan item niet verwijderen omdat afhankelijke %{record} bestaan
10
+ date:
11
+ abbr_day_names:
12
+ - zo
13
+ - ma
14
+ - di
15
+ - wo
16
+ - do
17
+ - vr
18
+ - za
19
+ abbr_month_names:
20
+ -
21
+ - jan
22
+ - feb
23
+ - mrt
24
+ - apr
25
+ - mei
26
+ - jun
27
+ - jul
28
+ - aug
29
+ - sep
30
+ - okt
31
+ - nov
32
+ - dec
33
+ day_names:
34
+ - zondag
35
+ - maandag
36
+ - dinsdag
37
+ - woensdag
38
+ - donderdag
39
+ - vrijdag
40
+ - zaterdag
41
+ formats:
42
+ default: "%d-%m-%Y"
43
+ long: "%e %B %Y"
44
+ short: "%e %b"
45
+ month_names:
46
+ -
47
+ - januari
48
+ - februari
49
+ - maart
50
+ - april
51
+ - mei
52
+ - juni
53
+ - juli
54
+ - augustus
55
+ - september
56
+ - oktober
57
+ - november
58
+ - december
59
+ order:
60
+ - :day
61
+ - :month
62
+ - :year
63
+ datetime:
64
+ distance_in_words:
65
+ about_x_hours:
66
+ one: ongeveer een uur
67
+ other: ongeveer %{count} uur
68
+ about_x_months:
69
+ one: ongeveer een maand
70
+ other: ongeveer %{count} maanden
71
+ about_x_years:
72
+ one: ongeveer een jaar
73
+ other: ongeveer %{count} jaar
74
+ almost_x_years:
75
+ one: bijna een jaar
76
+ other: bijna %{count} jaar
77
+ half_a_minute: een halve minuut
78
+ less_than_x_seconds:
79
+ one: minder dan een seconde
80
+ other: minder dan %{count} seconden
81
+ less_than_x_minutes:
82
+ one: minder dan een minuut
83
+ other: minder dan %{count} minuten
84
+ over_x_years:
85
+ one: meer dan een jaar
86
+ other: meer dan %{count} jaar
87
+ x_seconds:
88
+ one: 1 seconde
89
+ other: "%{count} seconden"
90
+ x_minutes:
91
+ one: 1 minuut
92
+ other: "%{count} minuten"
93
+ x_days:
94
+ one: 1 dag
95
+ other: "%{count} dagen"
96
+ x_months:
97
+ one: 1 maand
98
+ other: "%{count} maanden"
99
+ x_years:
100
+ one: 1 jaar
101
+ other: "%{count} jaar"
102
+ prompts:
103
+ second: seconde
104
+ minute: minuut
105
+ hour: uur
106
+ day: dag
107
+ month: maand
108
+ year: jaar
109
+ errors:
110
+ format: "%{attribute} %{message}"
111
+ messages:
112
+ accepted: moet worden geaccepteerd
113
+ blank: moet opgegeven zijn
114
+ confirmation: komt niet overeen met %{attribute}
115
+ empty: moet opgegeven zijn
116
+ equal_to: moet gelijk zijn aan %{count}
117
+ even: moet even zijn
118
+ exclusion: is gereserveerd
119
+ greater_than: moet groter zijn dan %{count}
120
+ greater_than_or_equal_to: moet groter dan of gelijk zijn aan %{count}
121
+ inclusion: is niet in de lijst opgenomen
122
+ invalid: is ongeldig
123
+ less_than: moet minder zijn dan %{count}
124
+ less_than_or_equal_to: moet minder dan of gelijk zijn aan %{count}
125
+ model_invalid: 'Validatie mislukt: %{errors}'
126
+ not_a_number: is geen getal
127
+ not_an_integer: moet een geheel getal zijn
128
+ odd: moet oneven zijn
129
+ other_than: moet anders zijn dan %{count}
130
+ present: moet leeg zijn
131
+ required: moet bestaan
132
+ taken: is al in gebruik
133
+ too_long:
134
+ one: is te lang (maximaal %{count} teken)
135
+ other: is te lang (maximaal %{count} tekens)
136
+ too_short:
137
+ one: is te kort (minimaal %{count} teken)
138
+ other: is te kort (minimaal %{count} tekens)
139
+ wrong_length:
140
+ one: heeft onjuiste lengte (moet 1 teken lang zijn)
141
+ other: heeft onjuiste lengte (moet %{count} tekens lang zijn)
142
+ template:
143
+ body: 'Er zijn problemen met de volgende velden:'
144
+ header:
145
+ one: "%{model} niet opgeslagen: 1 fout gevonden"
146
+ other: "%{model} niet opgeslagen: %{count} fouten gevonden"
147
+ helpers:
148
+ select:
149
+ prompt: Maak een keuze
150
+ submit:
151
+ create: "%{model} toevoegen"
152
+ submit: "%{model} opslaan"
153
+ update: "%{model} bijwerken"
154
+ number:
155
+ currency:
156
+ format:
157
+ delimiter: "."
158
+ format: "%u %n"
159
+ precision: 2
160
+ separator: ","
161
+ significant: false
162
+ strip_insignificant_zeros: false
163
+ unit: "€"
164
+ format:
165
+ delimiter: "."
166
+ precision: 2
167
+ separator: ","
168
+ significant: false
169
+ strip_insignificant_zeros: false
170
+ human:
171
+ decimal_units:
172
+ format: "%n %u"
173
+ units:
174
+ billion: miljard
175
+ million: miljoen
176
+ quadrillion: biljard
177
+ thousand: duizend
178
+ trillion: biljoen
179
+ unit: ''
180
+ format:
181
+ delimiter: ''
182
+ precision: 3
183
+ significant: true
184
+ strip_insignificant_zeros: true
185
+ storage_units:
186
+ format: "%n %u"
187
+ units:
188
+ byte:
189
+ one: byte
190
+ other: bytes
191
+ gb: GB
192
+ kb: KB
193
+ mb: MB
194
+ tb: TB
195
+ percentage:
196
+ format:
197
+ delimiter: ''
198
+ format: "%n%"
199
+ precision:
200
+ format:
201
+ delimiter: ''
202
+ support:
203
+ array:
204
+ last_word_connector: " en "
205
+ two_words_connector: " en "
206
+ words_connector: ", "
207
+ time:
208
+ am: "'s ochtends"
209
+ formats:
210
+ default: "%a %d %b %Y %H:%M:%S %Z"
211
+ long: "%d %B %Y %H:%M"
212
+ short: "%d %b %H:%M"
213
+ pm: "'s middags"
@@ -0,0 +1,65 @@
1
+ # Additional translations at https://github.com/heartcombo/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock instructions"
26
+ email_changed:
27
+ subject: "Email Changed"
28
+ password_change:
29
+ subject: "Password Changed"
30
+ omniauth_callbacks:
31
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
32
+ success: "Successfully authenticated from %{kind} account."
33
+ passwords:
34
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
35
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
36
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
37
+ updated: "Your password has been changed successfully. You are now signed in."
38
+ updated_not_active: "Your password has been changed successfully."
39
+ registrations:
40
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
41
+ signed_up: "Welcome! You have signed up successfully."
42
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
43
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
44
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
45
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address."
46
+ updated: "Your account has been updated successfully."
47
+ updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again."
48
+ sessions:
49
+ signed_in: "Signed in successfully."
50
+ signed_out: "Signed out successfully."
51
+ already_signed_out: "Signed out successfully."
52
+ unlocks:
53
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
54
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
55
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
56
+ errors:
57
+ messages:
58
+ already_confirmed: "was already confirmed, please try signing in"
59
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
60
+ expired: "has expired, please request a new one"
61
+ not_found: "not found"
62
+ not_locked: "was not locked"
63
+ not_saved:
64
+ one: "1 error prohibited this %{resource} from being saved:"
65
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,85 @@
1
+
2
+ # The devise.en.yml file translated to Dutch
3
+ # https://github.com/plataformatec/devise/blob/master/config/locales/en.yml
4
+ #
5
+ # This includes the changes from Devise 4.5 and 4.6:
6
+ # A new key was added in Devise 4.5: `updated_but_not_signed_in:`
7
+ # In Devise 4.6, the old helper `<% devise_error_messages %>` was replaced with
8
+ # `<%= render 'devise/shared/error_messages', resource: resource %>`
9
+
10
+ # Starting points for this translation:
11
+ # * User-centered language: don't tell what the system knows, tell what the user should do or should expect
12
+ # (Except for widely used messages like 'account confirmed', 'password invalid').
13
+ # * Make the messages consistent, with proper grammar (especially with regard to verb tenses).
14
+ # * English has one definite article ('the'); Dutch has two ('het', 'de'). Sometimes rephrasing with 'je' ('your') is a better solution.
15
+ # * Use informal but polite wording.
16
+ # * Use `e-mailadres` for the email address (key: `:email`), `mail` for an email message (cf advice Taaldienst).
17
+ # * Use `update` for `update`, as it is accepted Dutch (Van Dale). But: avoid the hard to read past participle `geüpdatet`.
18
+ # * Use `account maken` for `sign up`, `inloggen` for `sign in`, consistently.
19
+ # * Avoid revealing too much information: use the same message for 'invalid' and 'not found in database' failure messages.
20
+ # * In Dutch, only complete sentences end with `.`.
21
+
22
+
23
+ nl:
24
+ devise:
25
+ confirmations:
26
+ confirmed: Je account is bevestigd.
27
+ send_instructions: Er is een mail onderweg waarmee je je account kunt bevestigen.
28
+ send_paranoid_instructions: Als je een account hebt voor dit e-mailadres, ontvang je een mail waarmee je je account kunt bevestigen.
29
+ failure:
30
+ already_authenticated: Je bent al ingelogd.
31
+ inactive: Je account is nog niet actief.
32
+ invalid: Je %{authentication_keys} of wachtwoord is ongeldig.
33
+ locked: Je account is geblokkeerd.
34
+ last_attempt: Je kan het nog één keer proberen voordat je account wordt geblokkeerd.
35
+ not_found_in_database: Je %{authentication_keys} of wachtwoord is ongeldig.
36
+ timeout: De sessie is verlopen. Log opnieuw in.
37
+ unauthenticated: Log eerst in of maak een account.
38
+ unconfirmed: Bevestig eerst je e-mailadres.
39
+ mailer:
40
+ confirmation_instructions:
41
+ subject: Bevestig je e-mailadres om je account te activeren.
42
+ reset_password_instructions:
43
+ subject: Een nieuw wachtwoord instellen.
44
+ unlock_instructions:
45
+ subject: De blokkering van je account opheffen.
46
+ email_changed:
47
+ subject: Je e-mailadres is aangepast.
48
+ password_change:
49
+ subject: Je wachtwoord is aangepast.
50
+ omniauth_callbacks:
51
+ failure: Inloggen met je %{kind} account is niet gelukt, doordat \"%{reason}\".
52
+ success: Je bent nu ingelogd met je %{kind} account.
53
+ passwords:
54
+ no_token: Je kunt je wachtwoord hier alleen veranderen vanuit de mail die je is toegestuurd. Klik op de link in de mail of kopieer de hele link in de adresbalk."
55
+ send_instructions: Er is een mail onderweg met uitleg hoe je je wachtwoord kunt updaten.
56
+ send_paranoid_instructions: Als je een account hebt voor dit e-mailadres, krijg je een mail waarmee je je wachtwoord kunt updaten."
57
+ updated: Het updaten van je wachtwoord is gelukt en je bent nu ingelogd.
58
+ updated_not_active: Het updaten van je wachtwoord is gelukt.
59
+ registrations:
60
+ destroyed: Je account is verwijderd. Dag!
61
+ signed_up: Je account is aangemaakt. Welkom!
62
+ signed_up_but_inactive: Je account is aangemaakt. Je account is nog niet actief en daarom ben je niet automatisch ingelogd.
63
+ signed_up_but_locked: Je account is aangemaakt, maar het is geblokkeerd.
64
+ signed_up_but_unconfirmed: Er is een bevestigingsmail onderweg. Klik op de link in de mail om je e-mailadres te bevestigen.
65
+ update_needs_confirmation: "Het updaten van je account is gelukt. Je hoeft alleen nog je e-mailadres te bevestigen: klik op de link in de bevestigingsmail."
66
+ updated: Het updaten van je account is gelukt.
67
+ updated_but_not_signed_in: Het updaten van je account is gelukt. Je kunt nu inloggen met je nieuwe wachtwoord.
68
+ sessions:
69
+ signed_in: Je bent nu ingelogd.
70
+ signed_out: Je bent nu uitgelogd.
71
+ already_signed_out: Je was al uitgelogd.
72
+ unlocks:
73
+ send_instructions: Er is een mail onderweg waarmee je de blokkering van je account kunt opheffen.
74
+ send_paranoid_instructions: Als je een account hebt voor dit e-mailadres, krijg je een mail waarmee je de blokkering van je account kunt opheffen.
75
+ unlocked: Je account werkt weer. Je kunt nu inloggen.
76
+ errors:
77
+ messages:
78
+ already_confirmed: was al bevestigd. Je kunt meteen inloggen.
79
+ confirmation_period_expired: is niet binnen de vereiste %{period} bevestigd. Vraag een nieuwe bevestigingsmail aan.
80
+ expired: is niet op tijd bevestigd.
81
+ not_found: bestaat niet.
82
+ not_locked: is niet geblokkeerd.
83
+ not_saved:
84
+ one: "De %{resource} kon niet worden opgeslagen vanwege een fout:"
85
+ other: "De %{resource} kon niet worden opgeslagen vanwege %{count} fouten:"
@@ -0,0 +1,6 @@
1
+ en:
2
+ language_name: English
3
+
4
+ date:
5
+ formats:
6
+ default: "%d/%m/%Y"
@@ -0,0 +1,39 @@
1
+ en:
2
+ formstrap:
3
+ file:
4
+ not_found: Not available
5
+ placeholder:
6
+ one: Browse file or drag & drop it here
7
+ other: Browse files or drag & drop them here
8
+ group:
9
+ save: Save
10
+ blocks:
11
+ add: "Add %{name}"
12
+ empty:
13
+ title: No blocks are added yet.
14
+ add: Add block
15
+ block:
16
+ add: Add
17
+ remove:
18
+ title: Delete
19
+ confirm: Are you sure you want to delete this?
20
+ modal:
21
+ close: Close
22
+ title: "Edit block '%{name}'"
23
+ media:
24
+ validation:
25
+ min:
26
+ one: Please select at least 1 item
27
+ other: "Please select at least %{count} items"
28
+ max:
29
+ one: Please limit your selection to maximum 1 item
30
+ other: "Please limit your selection to maximum %{count} items"
31
+
32
+ select:
33
+ blank: Make a choice
34
+ repeater:
35
+ add: "Add %{name}"
36
+ empty: Start by adding your first block
37
+ row:
38
+ add: Add row
39
+ remove: Remove row
@@ -0,0 +1,39 @@
1
+ nl:
2
+ formstrap:
3
+ file:
4
+ not_found: Niet beschikbaar
5
+ placeholder:
6
+ one: Kies bestand of sleep het hierheen
7
+ other: Kies bestanden of sleep ze hierheen
8
+ group:
9
+ save: Opslaan
10
+ blocks:
11
+ add: "%{name} toevoegen"
12
+ empty:
13
+ title: Er zijn nog geen blokken toegevoegd.
14
+ add: Blok toevoegen
15
+ block:
16
+ add: Toevoegen
17
+ remove:
18
+ title: Verwijderen
19
+ confirm: Ben je zeker dat je dit wil verwijderen?
20
+ modal:
21
+ close: Sluiten
22
+ title: "Wijzig blok '%{name}'"
23
+ media:
24
+ validation:
25
+ min:
26
+ one: Gelieve minstens 1 item te selecteren
27
+ other: "Gelieve minstens %{count} items te selecteren"
28
+ max:
29
+ one: Gelieve maximum 1 item te selecteren
30
+ other: "Gelieve maximum %{count} items te selecteren"
31
+
32
+ select:
33
+ blank: Maak een keuze
34
+ repeater:
35
+ add: "%{name} toevoegen"
36
+ empty: Voeg je eerste blok toe om te beginnen
37
+ row:
38
+ add: Rij toevoegen
39
+ remove: Rij verwijderen
@@ -0,0 +1,24 @@
1
+ en:
2
+ formstrap:
3
+ media:
4
+ modal:
5
+ close: Close
6
+ limits: "minimum: %{min} en maximum: %{max}"
7
+ maximum: " of %{count}"
8
+ placeholder: Upload your first file to the media library
9
+ select: Select
10
+ title:
11
+ one: Select at least 1 file
12
+ other: Select at least %{count} files
13
+ unlimited: unlimited
14
+ upload: Upload new files
15
+ media_item_modal:
16
+ attachment_used_by: Used by
17
+ close: Close
18
+ dimensions: Dimensions
19
+ edit: Edit Media item
20
+ not_analysed: Not yet analysed
21
+ size: Size
22
+ type: File type
23
+ update: Update
24
+ uploaded_at: Uploaded at
@@ -0,0 +1,24 @@
1
+ nl:
2
+ formstrap:
3
+ media:
4
+ modal:
5
+ close: Sluiten
6
+ limits: "minimum: %{min} and maximum: %{max}"
7
+ maximum: " van %{count}"
8
+ placeholder: Upload je eerste bestand naar de mediabibliotheek
9
+ select: Selecteer
10
+ title:
11
+ one: Selecteer bestand
12
+ other: Selecteer bestanden
13
+ unlimited: onbeperkt
14
+ upload: Nieuwe bestanden uploaden
15
+ media_item_modal:
16
+ attachment_used_by: Gebruikt door
17
+ close: Sluiten
18
+ dimensions: Afmetingen
19
+ edit: Media item wijzigen
20
+ not_analysed: Nog niet geanalyseerd
21
+ size: Grootte
22
+ type: Bestandstype
23
+ update: Update
24
+ uploaded_at: Geüpload op
@@ -0,0 +1,4 @@
1
+ en:
2
+ formstrap:
3
+ thumbnail:
4
+ title: Title
@@ -0,0 +1,4 @@
1
+ nl:
2
+ formstrap:
3
+ thumbnail:
4
+ title: Titel
@@ -0,0 +1,6 @@
1
+ nl:
2
+ language_name: Nederlands
3
+
4
+ date:
5
+ formats:
6
+ default: "%d/%m/%Y"
data/config/routes.rb ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.routes.draw do
4
+ namespace(:formstrap) do
5
+ get "media", to: "media#index", as: :media
6
+ post "media", to: "media#create", as: :new_media
7
+ get "media/:id", to: "media#show", as: :media_item
8
+ patch "media/:id", to: "media#update"
9
+ get "media/thumbnail/:id", to: "media#thumbnail", as: :media_item_thumbnail
10
+ end
11
+ end
data/esbuild-css.js ADDED
@@ -0,0 +1,25 @@
1
+ const esbuild = require('esbuild')
2
+ const sassPlugin = require('esbuild-sass-plugin').sassPlugin
3
+ const watch = process.argv.includes('-w')
4
+
5
+ // Used to skip external URLs in scss files
6
+ const externalUrlPlugin = {
7
+ name: 'custom-resolver',
8
+ setup (build) {
9
+ build.onResolve({ filter: /^https?:\/\// }, ({ path }) => {
10
+ return { path, external: true, namespace: 'provided' }
11
+ })
12
+ }
13
+ }
14
+
15
+ esbuild.build({
16
+ entryPoints: ['src/scss/formstrap.scss'],
17
+ outfile: 'app/assets/stylesheets/formstrap.css',
18
+ bundle: true,
19
+ watch: watch,
20
+ allowOverwrite: true,
21
+ plugins: [
22
+ externalUrlPlugin,
23
+ sassPlugin()
24
+ ]
25
+ }).catch((e) => console.error(e.message))
data/esbuild-js.js ADDED
@@ -0,0 +1,11 @@
1
+ const esbuild = require('esbuild')
2
+ const watch = process.argv.includes('-w')
3
+
4
+ esbuild.build({
5
+ entryPoints: ['src/js/formstrap.js'],
6
+ outfile: 'app/assets/javascripts/formstrap.js',
7
+ bundle: true,
8
+ allowOverwrite: true,
9
+ format: 'esm',
10
+ watch: watch
11
+ }).catch((e) => console.error(e.message))
data/formstrap.gemspec ADDED
@@ -0,0 +1,37 @@
1
+ require_relative "lib/formstrap/version"
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "formstrap"
5
+ spec.version = Formstrap::VERSION
6
+ spec.authors = ["Jef Vlamings"]
7
+ spec.email = ["vlamingsjef@gmail.com"]
8
+
9
+ spec.summary = "Bootstrap-powered Form Helpers"
10
+ spec.description = "An extensive Bootstrap form library to power your Ruby On Rails application."
11
+ spec.homepage = "https://github.com/frontierdotbe/formstrap"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
14
+
15
+ spec.metadata["homepage_uri"] = spec.homepage
16
+ spec.metadata["source_code_uri"] = "https://github.com/frontierdotbe/formstrap"
17
+ spec.metadata["changelog_uri"] = "https://github.com/frontierdotbe/formstrap/releases"
18
+
19
+ # Specify which files should be added to the gem when it is released.
20
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
23
+ end
24
+ spec.bindir = "exe"
25
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ["lib"]
27
+
28
+ # Uncomment to register a new dependency of your gem
29
+ # spec.add_dependency "example-gem", "~> 1.0"
30
+ # spec.add_runtime_dependency "closure_tree", "~> 7.4"
31
+ # spec.add_runtime_dependency "inline_svg", "~> 1.7"
32
+ # spec.add_runtime_dependency "redcarpet", "~> 3.5"
33
+ # spec.add_runtime_dependency "rouge", "~> 3.28"
34
+
35
+ # For more information and examples about making a new gem, checkout our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
data/formstrap.iml ADDED
@@ -0,0 +1,34 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="FacetManager">
4
+ <facet type="RailsFacetType" name="Ruby on Rails">
5
+ <configuration>
6
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
7
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
8
+ <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$/test/dummy" />
9
+ </configuration>
10
+ </facet>
11
+ </component>
12
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
13
+ <exclude-output />
14
+ <content url="file://$MODULE_DIR$">
15
+ <sourceFolder url="file://$MODULE_DIR$/test/dummy/features" isTestSource="true" />
16
+ <sourceFolder url="file://$MODULE_DIR$/test/dummy/spec" isTestSource="true" />
17
+ <sourceFolder url="file://$MODULE_DIR$/test/dummy/test" isTestSource="true" />
18
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/.bundle" />
19
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/public/packs" />
20
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/vendor/bundle" />
21
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/vendor/cache" />
22
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/log" />
23
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/tmp" />
24
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/public/system" />
25
+ <excludeFolder url="file://$MODULE_DIR$/test/dummy/components" />
26
+ </content>
27
+ <orderEntry type="inheritedJdk" />
28
+ <orderEntry type="sourceFolder" forTests="false" />
29
+ </component>
30
+ <component name="RModuleSettingsStorage">
31
+ <LOAD_PATH number="0" />
32
+ <I18N_FOLDERS number="1" string0="$MODULE_DIR$/test/dummy/config/locales" />
33
+ </component>
34
+ </module>
@@ -0,0 +1,27 @@
1
+ module Formstrap
2
+ class Engine < Rails::Engine
3
+ engine_name "formstrap"
4
+
5
+ # require "closure_tree"
6
+ # require "redcarpet"
7
+ # require "rouge"
8
+
9
+ # Add translations to main app
10
+ config.before_configuration do
11
+ config.i18n.load_path += Dir["#{config.root}/config/locales/**/*.yml"]
12
+ end
13
+
14
+ # Add assets to precompilation list
15
+ initializer "formstrap.assets" do |app|
16
+ next unless app.config.respond_to?(:assets)
17
+ app.config.assets.precompile += %w[formstrap.js formstrap.css formstrap.scss]
18
+ end
19
+
20
+ # Add importmap to main app
21
+ initializer "headmin.importmap", before: "importmap" do |app|
22
+ next unless app.config.respond_to?(:importmap)
23
+ app.config.importmap.paths << Engine.root.join("config/importmap.rb")
24
+ app.config.importmap.cache_sweepers << Engine.root.join("app/assets/javascripts")
25
+ end
26
+ end
27
+ end