Commit Graph

32 Commits

Author SHA1 Message Date
Carlos Antonio da Silva fe8e36ab91 Use CollectionInput as base for other collection inputs 2012-01-26 18:10:34 -02:00
Carlos Antonio da Silva 3669bce6cf Rename *CollectionInput to *CollectionSelectInput 2012-01-26 17:00:56 -02:00
Carlos Antonio da Silva 85612cb9e9 Split collection radio/check boxes in different components 2012-01-26 16:53:16 -02:00
Carlos Antonio da Silva ec10a9669e Collection radio / check boxes respect :nested boolean style config 2012-01-26 16:17:12 -02:00
Carlos Antonio da Silva ed43005eb3 Move SimpleForm configs from AV helpers to collection input
SimpleForm configs should not belong to helpers that are mixed into
ActionView, they should be used internally and passed to these helpers
as options instead. This keeps the helpers simpler and will allows
further improvements.
2012-01-26 15:00:00 -02:00
Carlos Antonio da Silva fb3e4f61cb Avoid translating each key in the collection, just lookup once 2012-01-24 15:23:46 -02:00
Carlos Antonio da Silva 68b9f6c098 Fix tests with latest changes using :defaults in translation
Also expand tests to check for :defaults and specific object name
namespace for translations, and add check boxes tests.
2012-01-24 15:04:37 -02:00
Carlos Antonio da Silva b4e297f98c Merge branch 'master' of https://github.com/klobuczek/simple_form into klobuczek-master
Conflicts:
	Gemfile
	README.md
	lib/simple_form/inputs/base.rb
	lib/simple_form/inputs/collection_input.rb
	test/support/models.rb
2012-01-24 14:52:00 -02:00
Carlos Antonio da Silva e68094e652 Merge pull request #382 from semaperepelitsa/grouped_collection
Grouped collection input
Conflicts:

	test/inputs_test.rb
2012-01-24 11:20:23 -02:00
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
Heinrich Klobuczek f6fbaf2d9c Merge remote branch 'upstream/master'
Conflicts:
	README.md
	test/inputs_test.rb
2011-10-04 02:07:40 +02:00
Heinrich Klobuczek f8d675c71d collection translation is happening for collections of symbols 2011-09-05 13:24:24 -07:00
José Valim 5d6d977fc8 Break up mapping input and also provide an enable API. 2011-09-03 11:13:29 +02:00
Heinrich Klobuczek cdffc86984 corrected translate_collection 2011-08-29 01:48:14 -07:00
Heinrich Klobuczek c439ad00fa prevented modifying original caller's collection 2011-08-28 22:34:42 -07:00
Heinrich Klobuczek 9790f90d30 added the ability to use i18n to translate collection values 2011-08-21 22:36:00 -07: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