-
Notifications
You must be signed in to change notification settings - Fork 26
/
CHANGELOG
419 lines (210 loc) · 18.2 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
=== master
* Support Sequel::Model#forme_required_abbr_title to control the content of the title attribute for abbr tags (jeremyevans)
* Add Serializer#self_closing_tag? private method for easier overriding in subclasses (jeremyevans)
=== 2.6.0 (2024-06-18)
* Add Roda forme_erubi_capture_block plugin to support erubi/capture_block <%= form do %> <% end %> tags (jeremyevans)
* Support :hr as select option value to use a hr tag instead of an option tag (jeremyevans)
* Support maxlength and minlength options as attributes for textareas (jeremyevans)
* Support minlength option as attribute for text inputs (jeremyevans)
=== 2.5.0 (2024-02-13)
* Add hidden inputs to work with formaction/formmethod support in Roda 3.77+ route_csrf plugin (jeremyevans)
* Support :formaction option on buttons (jeremyevans)
* Support emit: false option for non-rails template forms allowing block based form use without appending to template (jeremyevans)
=== 2.4.1 (2023-09-19)
* Add dependency on bigdecimal, as bigdecimal is moving from standard library to bundled gem in Ruby 3.4 (jeremyevans)
=== 2.4.0 (2023-04-05)
* Support Sequel::Model#forme_use_required_abbr? to control whether to add abbr * tag for required inputs (jeremyevans) (#105)
* Make select input with option groups and a :value option correctly set selected attribute on options in all optgroups (v-kolesnikov) (#111, #110)
* Make Roda forme_set plugin only include metadata for inputs in the same form, and not inputs on other forms on the same page (jeremyevans) (#109)
* Use erb/escape for faster HTML escaping if available (jeremyevans)
=== 2.3.0 (2022-11-15)
* Add forme/bs5 for Bootstrap 5 support (janko) (#106)
* Raise exception if attempting to load Roda forme_set plugin without setting :secret option (janko) (#104)
=== 2.2.0 (2022-06-28)
* Use inputmode and pattern attributes instead of type=number for integer fields in the Sequel forme plugin (jeremyevans)
* Respect explicit nil/false :value option for boolean inputs in the Sequel forme plugin (jeremyevans)
* In bs3 support, make sure error spans have id referenced by aria-describedby (jeremyevans)
* Set aria-describedby attribute automatically even if :error_id is given manually (jeremyevans)
=== 2.1.0 (2022-05-25)
* Avoid hidden inputs inside tbody tags in subform in the Sequel::Model support, since that results in invalid HTML (jeremyevans)
* Fix verbose warnings in forme/rails (jeremyevans)
* Remove deprecated forme/sinatra and Forme::Sinatra::ERB (jeremyevans)
* Remove deprecated Form :hidden_tags option (jeremyevans)
=== 2.0.0 (2021-11-30)
* Remove Tag#<< method (jeremyevans)
* Remove Form#_inputs method (jeremyevans)
* Deprecate forme/sinatra and Forme::Sinatra::ERB, switch to forme/erb and Forme::ERB::Helper (jeremyevans)
* Deprecate Form :hidden_tags option (jeremyevans)
* Add Form#post? for whether the form will submit via POST (jeremyevans)
* Add Form#form_tag_attributes for getting the attributes used for the form tag (jeremyevans)
* Add :before and :after Form options, as an alternative way to implement hooks (jeremyevans)
* Passing a callable as the child of a tag should now not call methods that will modify the related form (such as Form#tag) (jeremyevans)
* Change API for _forme_form_options private method used in template integrations (jeremyevans)
* Remove Form#{nesting,tag_,raw_output,emit} (jeremyevans)
* Make Form#{form,tag,input,inputs} return HTML string (jeremyevans)
* Refactor internals, switch template integration to use delegation instead of inheritance (jeremyevans)
* Add Roda forme_erubi_capture plugin to support erubi/capture_end <%|= form do %> <%| end %> tags (jeremyevans)
* Make bs3 formatter automatically setup aria-invalid and aria-describedby attributes for errors (waiting-for-dev) (#96)
* Make bs3 formatter handle form-level :errors key (waiting-for-dev) (#96)
* Drop support for Ruby 1.8 (jeremyevans)
=== 1.12.0 (2021-08-25)
* Make forme_set Sequel plugin handle frozen Sequel::Model instances (jeremyevans)
* Do not override an error on a field when using the Sequel plugin if :error option is already given (jeremyevans)
* Avoid error when creating label text when using Sequel input on non-Sequel form without an explicit :label option (jeremyevans)
* Make :select_options option for date/datetime selects support providing both option texts and option values using a 2 element array (jeremyevans)
=== 1.11.0 (2020-01-03)
* Add Roda forme_set plugin, using HMACed form metadata to automatically handle submitted form parameters (jeremyevans)
=== 1.10.0 (2019-05-13)
* Make readonly formatter ignore hidden inputs (jeremyevans)
* Add :select_labels for date inputs using :as=>:select to use labels for the inputs for better accessibility (jeremyevans)
* Add :after_legend error_handler for adding error message after legend when using :legend labeler (jeremyevans)
* Add aria-describedby to all inputs with errors where possible for better accessibility (jeremyevans)
* Add aria-invalid to all inputs with errors for better accessibility (jeremyevans)
* Support :fieldset wrapper and :legend labeler, can be used for accessible radioset/checkboxset (jeremyevans)
* Support :tag_label_attr option for radioset and checkbox set for label attributes for each radio/checkbox label (jeremyevans)
* Support custom :error_handler in radioset and checkboxset inputs (jeremyevans)
* Support custom :labeler in radioset and checkboxset inputs (jeremyevans)
* Avoid calling Proc.new with an implicit block, which is deprecated starting in ruby 2.7 (jeremyevans)
=== 1.9.0 (2018-11-16)
* Automatically add maxlength attributes to text and textarea inputs in the Sequel plugin based on maximum database column length (jeremyevans)
* Make forme_set Sequel plugin recognize default formatter changes set via with_opts (jeremyevans)
* Use div with nested p tags instead of spans for readonly textarea inputs (jeremyevans)
* Make readonly text input spans use the readonly-text class for easier styling (jeremyevans)
* Add Forme.h for HTML escaping, using cgi/escape if available for faster escaping (jeremyevans)
* Correctly handle :value=>false option and false option values in select, radioset, and checkboxset inputs (jeremyevans)
=== 1.8.0 (2018-06-11)
* Add support for :errors form option for setting error information for multiple inputs, similar to :values form option (adam12) (#32)
* Add Roda forme_route_csrf plugin using route_csrf plugin for request-specific CSRF tokens (jeremyevans)
* Add forme_default_request_method as a method to check for object forms, setting the default form method (jeremyevans)
* Support :dasherize_data input option to convert underscores to dashes for :data hash symbol keys (janko-m) (#29)
* Omit labels for hidden inputs in Sequel plugin (janko-m) (#27)
* Allow use of :type option for specifying input type when using an associated object that doesn't respond to forme_input (janko-m) (#25)
* Ignore default values for Sequel inputs when type: :file option is used (janko-m) (#24)
=== 1.7.0 (2018-02-07)
* Have radioset and checkboxset inputs respect :error_attr option (jeremyevans)
* Add :tag_labeler option for checkboxsets and radiosets for the labeler to use for individual elements (jeremyevans)
* Use milliseconds instead of microseconds for serializing Time and DateTime values, since that's what datetime-local inputs support (jeremyevans)
=== 1.6.0 (2017-05-03)
* Use thead/tbody tags for table inputs_wrapper transformer and Sequel plugin subform :grid option (jeremyevans)
* Do not create a hidden input for checkboxes when using disabled/readonly formatters (jeremyevans)
* Add support for overriding forme_namespace on the Sequel::Model instance to change forme's namespacing (mwpastore, jeremyevans) (#17)
* Allow :label_attr for checkboxset and radioset to set attributes for individual labels in the set (jeremyevans)
=== 1.5.0 (2016-08-09)
* Add forme_set Sequel plugin, for handling the intake of submitted params based on form fields (jeremyevans)
* Only add csrf tag in forme/erb support if there is a current session in the environment (jeremyevans)
* Fix frozen string literal issue in explicit labeler (jeremyevans)
* Add forme_i18n Sequel plugin, for internalization support (badosu) (#15)
=== 1.4.0 (2016-02-01)
* Ignore submit buttons when using the :readonly formatter (jeremyevans)
* Respect :formatter option for radioset and checkboxset inputs (jeremyevans)
* Add support for running with --enable-frozen-string-literal on ruby 2.3 (jeremyevans)
* Integrate with the Sequel association_pks plugin in the Sequel plugin (jeremyevans)
* Do not add required * to label if :label=>nil in the Sequel plugin (jeremyevans)
* Add forme/bs3 library for Bootstrap 3 support (kematzy, jeremyevans) (#12, #14)
* Support an :html option in the default formatter to override the HTML created (jeremyevans)
=== 1.3.0 (2015-04-17)
* Support option groups in select, checkboxset, and radioset inputs via :optgroups option (jeremyevans)
* Support :select_options option for date/datetime :as=>:select, for setting specific options in each select field (jeremyevans)
* The id for first select input for date/datetime :as=>:select is now the same as the :id option/attribute (jeremyevans)
* Support :order option for date/datetime :as=>:select inputs, so you can order select boxes day/month/year or month/day/year (jeremyevans)
* Add helper transformer type, for adding help text next to fields (jeremyevans)
* Support :skip_primary_key option to not add hidden primary key fields for existing associated objects in subform in the Sequel plugin (jeremyevans)
* Support :blank_attr option for select/radioset/checkboxset inputs (jeremyevans)
* Support :blank_position=>:after option for select/radioset/checkboxset inputs (jeremyevans)
* Respect existing :add_blank option when using select tags for boolean fields in the Sequel plugin (jeremyevans)
* Use type=datetime-local for datetime types (jeremyevans)
* Handle error messages on the underlying column in pg_array_to_many associations (jeremyevans)
=== 1.2.0 (2014-11-06)
* Support pg_array_to_many associations in the Sequel plugin, treating them similarly to other *_to_many associations (jeremyevans)
* When using :grid option to subform in the Sequel plugin, :inputs_opts can be used to pass options to the InputsWrapper (jeremyevans)
* Support :error_attr option for inputs, for setting attributes to use for error message span (jeremyevans)
* Make explicit labeler use label-before and label-after classes specifying the label position (jeremyevans)
* Support :size option for select inputs (jeremyevans)
=== 1.1.0 (2014-09-07)
* Make form without a block in the ERB integration still use hidden tags if method is post (jeremyevans)
* Add Forme::RawString class, Forme.raw, and Form#raw for creating raw strings, so you don't need to use extend(Forme::Raw) (jeremyevans)
* Allow using nil as explicit transformer value when creating a Form, to disable default transformer (jeremyevans)
=== 1.0.0 (2014-07-30)
* Add roda plugin for forme (jeremyevans)
* Move forme/sinatra to forme/erb, since it is ERB and not Sinatra specific (jeremyevans)
* Do not extend objects at runtime when using the Sequel support (jeremyevans)
=== 0.10.0 (2014-07-01)
* Use #[] instead of #send to get input value for object forms if object is a hash (jeremyevans)
* Add Form#each_obj, for iterating over an Enumerable of objects, using with_obj for each object (jeremyevans)
* Add Form#with_obj, for changing a Form's object and namespace temporarily (jeremyevans)
* Support changing the namespace for a Form temporarily using with_opts(:namespace=>['ns1', 'ns2']) (jeremyevans)
* Use current namespace for form object inputs if :id/:name/:key is not specified (jeremyevans)
* Remove SequelForm#nested_associations accessor methods, no longer necessary (jeremyevans)
* Support changing the object for a Form temporarily using with_opts(:obj=>new_obj) (jeremyevans)
* Add :table, :tr, :ol, and :fieldset_ol wrappers, which automatically set wrapper and inputs_wrapper appropriately (jeremyevans)
* Add subform :grid option in Sequel plugin, for more compact editing of nested *_to_many associations (jeremyevans)
* Make table inputs_wrapper accept a :labels option and automatically set up th tags with the labels for each column (jeremyevans)
* Form#inputs now accepts a :nested_inputs_wrapper option to set default inputs_wrapper transformer inside the block (jeremyevans)
* Add tr inputs_wrapper and td wrapper, for horizontal layout of inputs inside a table (jeremyevans)
* Form#inputs now accepts transformer options (e.g :wrapper) and automatically calls with_opts (jeremyevans)
* Remove Form#format and Form#serialize (jeremyevans)
* Remove Form#{formatter,labeler,error_handler,wrapper,inputs_wrapper} accessors (jeremyevans)
* Add Form.with_opts method to override opts for the given block (jeremyevans)
* Remove Form#use_serializer and Serializer module (jeremyevans)
* table inputs_wrapper now respects the :legend and :legend_attr options, using a caption (jeremyevans)
* ol, div, and table inputs_wrappers now respect the :attr option (jeremyevans)
* Make subform always use the inputs_wrapper, even if :inputs is not given (jeremyevans)
* Allow input_defaults to work with symbol keys for inputs that use symbol types (jeremyevans)
* Support Form :values option, for automatically setting value attributes for inputs from submitted params (jeremyevans)
* Support :autofocus option for setting autofocus attribute, similar to :required and :disabled (jeremyevans)
* Add Forme.default_add_blank_prompt for setting default prompt used for :add_blank option (jeremyevans)
* Support radioset and checkboxset Input types (jeremyevans)
* Support :key and :key_id options for Inputs, for automatically setting name/id attributes based on current namespace (jeremyevans)
* Move namespace handling from Sequel plugin into the core (jeremyevans)
=== 0.9.2 (2014-04-10)
* Make association_select_options compatible with Sequel 4.10+ (jeremyevans)
=== 0.9.1 (2013-12-18)
* Use a tri-valued select box by default for boolean inputs with :required=>false option (jeremyevans)
=== 0.9.0 (2013-12-13)
* Support :input_defaults Form option for setting defaults for inputs by type (jeremyevans)
* Make html_usa serializer convert date/datetime inputs to text for better compatibility (jeremyevans)
* Format BigDecimal in standard notation instead of default scientific notation (jeremyevans)
* Make trtd wrapper always have labels on left side (jeremyevans)
* Make trtd wrapper always use 2 cells (jeremyevans)
* Use regular (not-multiple) select box for *_to_many associations for :multiple=>false option (jeremyevans)
* Associtions in the Sequel plugin now support a :dataset option to specify dataset to use for options (jeremyevans)
* The :name_method option used for associations in the Sequel plugin now allows for arbitrary callables (jeremyevans)
=== 0.8.0 (2013-10-30)
* form calls without block or :inputs or :button options are now handled correctly in the Sinatra integration (jeremyevans)
* CSRF token tags are now automatically added to forms in Rails and Sinatra if using rack_csrf (jeremyevans) (#5)
* Form objects now support a :hidden_tags option for automatically adding hidden tags (jeremyevans)
* Sequel many_to_one associations with existing and required values no longer have a blank option added by default (jeremyevans)
* ActiveSupport::SafeBuffer objects are now automatically treated as raw in the Rails integration (jeremyevans)
=== 0.7.0 (2012-05-02)
* Support :label_position option in both of the labelers, can be set to :before or :after to override the default (jeremyevans)
* Add Rails integration (jeremyevans)
* Make explicit labeler put label after checkboxes and radio buttons instead of before (jeremyevans)
* Make implicit labeler not include hidden checkbox inside label (jeremyevans)
* Recognize :cols and :rows options as attributes for textarea inputs in the default formatter (jeremyevans)
* Recognize :size and :maxlength options as attributes for text inputs in the default formatter (jeremyevans)
* Recognize :style option as attributes in the default formatter (jeremyevans)
* Join attribute values specified as arrays with spaces instead of the empty string (jeremyevans)
* Make Sinatra ERB integration work with partials (jeremyevans)
* Add id attributes for association :as=>:radio or :as=>:checkbox fields (jeremyevans)
* Add an html class attribute for radio/checkbox labels in :as=>:radio or :as=>:checkbox fields (jeremyevans)
* Wrap text acting as a label in a span with class label for :as=>:radio or :as=>:checkbox fields (jeremyevans)
* Support overriding the true/false label and values for select boolean fields in the Sequel plugin (jeremyevans)
=== 0.6.0 (2011-08-01)
* Fix wrapping for :as=>:radio boolean fields to handle them like association :as=>:radio fields (jeremyevans)
* Fix handling of Raw :label option in for association fields with :as=>:radio and :as=>:checkbox in the Sequel plugin (jeremyevans)
* Use label text for :as=>:radio boolean fields in the Sequel plugin (jeremyevans)
* Support overriding the true/false label and values for :as=>:radio boolean fields in the Sequel plugin (jeremyevans)
* Allow overriding the type of input for schema columns and associations in the Sequel plugin (jeremyevans)
* Add the label before the error option, so the error always comes after the label (jeremyevans)
* Always add error class to formatted input tag, regardless of error_handler (jeremyevans)
* Add labels to inputs for fields that the object doesn't respond to in the Sequel plugin (jeremyevans)
* Allow customization for non-schema columns that the object responds to in the Sequel plugin (jeremyevans)
* Handle errors on all inputs in the Sequel plugin, not just those backed by columns (jeremyevans)
* Fix default error_handler if input yields an area of tags (jeremyevans)
* Support :as=>:radio option for boolean fields in the Sequel plugin (jeremyevans)
* Allow specifying label attributes with :label_attr in labelers (jeremyevans)
* Allow Form#inputs to be called with a single options hash argument (jeremyevans)
* Handle unrecognized fields in the Sequel plugin if a :type option is given (jeremyevans)
* Add required * to label even if :label is already specified in the Sequel plugin (jeremyevans)
=== 0.5.0 (2011-07-01)
* Initial Release