José Valim
e8749ae07e
Add class default options to avoid has_*? checks.
2011-12-04 13:29:59 +01:00
José Valim
6bf59dd508
Get rid of the enabled/disabled in favor of has_*? syntax.
2011-12-04 12:29:53 +01:00
Vasiliy Ermolovich
2069b30b10
select can have required option, closes #340
2011-12-01 21:40:01 +03:00
Carlos Antonio da Silva
45e6d901bb
Refactor previous commit a bit
2011-10-26 14:40:20 -02:00
Jeff Kreeftmeijer
0824802cb1
Add Proc support to CollectionInput
2011-10-26 17:28:15 +02:00
José Valim
5d6d977fc8
Break up mapping input and also provide an enable API.
2011-09-03 11:13:29 +02:00
Rafael Mendonça França
12cae98a62
Remove unnecessary code
2011-04-07 21:41:12 -03:00
Wolfram Arnold
25803824eb
Add configuration option to explicitly turn off HTML5 extensions.
...
This includes the new field types such as email, number, search, url,
tel, and the new attributes such as required, autofocus, maxlength, min, max, step.
None of these are technically allowed in the HTML4 or XHTML1.0 doc types.
Test coverage and updated README.
Update config file generator with new HTML5 option.
2011-04-07 21:25:27 -03:00
Roel van Dijk
81e3609c3b
Fixed bug in MapType module when subclassing FormBuilder.
2011-04-06 08:37:14 +08:00
Carlos Antonio da Silva
bc2f3e73e8
Only add the "required" HTML 5 attribute for valid inputs, disable in selects (not allowed). Closes #141
2010-12-10 20:57:22 -02:00
Carlos Antonio da Silva
9eef9d1cb1
Refactor a bit collection input and ensure only label and value methods can be passed
...
There is no need to keep passing the collection as an arg to the methods,
just use it as an internal method in collection input.
2010-12-07 23:55:11 -02:00
Carlos Antonio da Silva
f0d1f3a31a
Make TrueClass and FalseClass convert to to_s by default within collections and refactor a bit
2010-12-07 00:24:56 -02:00
jfelchner
dbda259a02
Add ability to have mixed types in collections.
...
For example ["Some String", 2, 2.5, :lucky_stiff, nil] will render correct
option tags as you would expect.
2010-12-05 01:01:36 +08:00
Carlos Antonio da Silva
66555b1e60
Small refactor and review some private methods
2010-09-26 23:21:30 -03:00
Carlos Antonio da Silva
cf997937e1
Allow collection input to accept a collection of symbols, closes #33
2010-08-14 00:01:26 -03:00
José Valim
1ef232cf6d
Numberic type inputs now have type=number for HTML5.
2010-06-01 23:40:12 +02:00
José Valim
3873728e03
Do not pass :include_blank for DateTime inputs neither for PriorityZones when a priority is defined.
2010-02-03 15:56:27 +01:00
José Valim
7d7c6cda72
Code refactoring finished. Now tests one.
2010-01-09 16:05:02 +01:00