Fabien Potencier
9651175914
Merge remote branch 'vicb/form-transformers'
...
* vicb/form-transformers:
[Form] Add argument type checking in BaseDateTimeTransformer
[Form] Catch exceptions in DataTransformers
2011-05-11 10:12:23 +02:00
Fabien Potencier
723a8f2bf3
[Form] fixed CS
2011-05-11 10:09:27 +02:00
Victor Berchet
adef14f687
[Form] Make the PropertyPathMapper class use the UnexpectedTypeException
2011-05-10 20:25:46 +02:00
Victor Berchet
2e68801ff3
[Form] Add argument type checking in BaseDateTimeTransformer
2011-05-10 20:21:02 +02:00
Victor Berchet
dac798c791
[Form] Catch exceptions in DataTransformers
2011-05-10 20:21:02 +02:00
Victor Berchet
aa71d16812
[Form] Make TimezoneChoiceList implement ChoiceListInterface rather than extend ArrayChoiceList
2011-05-10 20:14:11 +02:00
Victor Berchet
2d62dfdf83
[Form] Fix some phpDoc
2011-05-10 16:55:05 +02:00
Victor Berchet
2a8f2d2bfa
[Form] fix and add some phpDoc
2011-05-10 15:33:02 +02:00
Victor Berchet
6c337d1cc0
[Form] Do not set the value attribute for file inputs
2011-05-09 17:00:19 +02:00
Victor Berchet
e0f03471ae
Merge branch 'master' into form-padded-choice-list
2011-05-09 15:30:04 +02:00
Kris Wallsmith
f3b077a0dd
[Form] removed a bunch of unused use statements
2011-05-06 14:07:16 -07:00
Victor Berchet
68b3d0d5ac
[Form] Allow for arbitrary keys in PaddedChoiceList
2011-05-06 10:31:51 +02:00
Michel Weimerskirch
476644a92c
[Form] Support for the HTML5 "pattern" attribute, see http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute
...
If you use the MinLength validator with your entities, the ValidatorTypeGuesser gets the value, stored as "minlength". Then, the FormFactory generates a "pattern" attribute out of minlength and maxlength.
Modern browsers such as Chrome use this attribute to validate the form before submitting.
a "pattern" attribute is generated that validates the
2011-05-04 23:16:41 +02:00
Bernhard Schussek
74cca63938
[Form] CSRF fields are not included in the children of a FormView anymore if the view is not the root
2011-05-04 18:27:20 +02:00
Bernhard Schussek
3cc5d9f4cd
[Form] Split the option "modifiable" of the "collection" type into "allow_add" and "allow_delete"
2011-05-04 17:29:59 +02:00
Bernhard Schussek
bf1dfbbe99
[Form] Added test for last commit by kriswallsmith and improved dealing with original names
...
The form component should now guarantee to always pass an UploadedFile object to your model. There you can call getOriginalName() to retrieve the original name of the uploaded file. For security reasons, the real file name is a generated hash value.
2011-05-04 17:04:44 +02:00
Kris Wallsmith
4ea274244d
[Form] updated listener to check that data is an array
2011-05-02 15:56:35 -07:00
Amal Raghav
26bfa43bfc
fixed a typo
2011-04-28 23:37:40 +05:30
Fabien Potencier
05f1481c6a
[Form] added the possibility to configure the CSRF field name and the disabling of the CSRF feature altogether
2011-04-28 11:28:44 +02:00
Fabien Potencier
751eaab326
Merge remote branch 'mweimerskirch/form_fixes'
...
* mweimerskirch/form_fixes:
Fix DateTimeType by adding missing default options
2011-04-28 08:18:28 +02:00
Fabien Potencier
f865a79742
[Form] fixed DateTimeToTimestampTransformer to use the proper exception class
2011-04-28 08:07:19 +02:00
Fabien Potencier
0007702321
Merge remote branch 'Seldaek/datetime'
...
* Seldaek/datetime:
[Form] Use proper transformation exception in case of failure
2011-04-28 08:05:08 +02:00
Jeremy Mikola
f59423626a
[Form] Remove unnecessary use statements in EventListeners
2011-04-27 12:18:45 -04:00
Eriksen Costa
164ce5210d
capitalized 'boolean'
2011-04-27 02:35:10 -03:00
Eriksen Costa
4db0752894
replaced 'bool' with 'Boolean'
2011-04-27 02:35:03 -03:00
Jordi Boggiano
d11b7baa7e
[Form] Use proper transformation exception in case of failure
2011-04-26 16:02:01 +02:00
Michel Weimerskirch
87c609b4a4
Fix DateTimeType by adding missing default options
2011-04-26 14:21:00 +02:00
Victor Berchet
f83e92bf44
Make casting scalar to array consistent
2011-04-26 12:16:35 +02:00
Fabien Potencier
c0a160b5f9
partially reverted previous merge
2011-04-24 22:02:19 +02:00
Fabien Potencier
c6e0ccfdcd
Merge remote branch 'pborreli/form-typo'
...
* pborreli/form-typo:
[Form] Fixed typos
2011-04-24 21:56:47 +02:00
Fabien Potencier
2f3ddb88ef
Merge remote branch 'bschussek/form'
...
* bschussek/form:
[Form] Automatically setting "data_class" option if objects are passed at the creation of a form
[Form] Improved the way passed data is handled in FormFactory
[Form] Simplified FileType code
[HttpFoundation] TemporaryStorage automatically creates the directory if it doesn't exist yet
[Form] Changed FormBuilder::build() to FormBuilder::create(). You hvae to pass the resulting builder to FormBuilder::add() manually now
[Form] Added FieldTypeValidatorExtension and fixed FQCN of DelegatingValidator
2011-04-24 21:53:24 +02:00
Pascal Borreli
06b3c386d9
[Form] Fixed typos
2011-04-24 14:05:16 +00:00
Fabien Potencier
08bf2af455
fixed email
2011-04-24 13:59:46 +02:00
Bernhard Schussek
e790587dc2
[Form] Automatically setting "data_class" option if objects are passed at the creation of a form
...
$form = $this->get('form.factory')->create(new PostType(), $post);
2011-04-24 13:38:12 +02:00
Bernhard Schussek
335f7e776a
[Form] Simplified FileType code
2011-04-24 12:08:56 +02:00
Ryan Weaver
181ef3cc08
[Form] Removing an unused variable in TimeType
2011-04-23 20:52:26 -05:00
Ryan Weaver
af8aad9c34
[Form] Throwing exception for invalid "input" type of DateType
...
Also fixed typo in test of previous commit
2011-04-23 20:36:40 -05:00
Ryan Weaver
f435ed7e7e
[Form] Removing unused private property and adding PHPDoc
2011-04-23 20:14:12 -05:00
Ryan Weaver
78b2062c5e
[Form] Adding an exception for an invalid widget option in DateType
2011-04-23 19:42:40 -05:00
Pascal Borreli
8c0beea677
[Phpdoc] Cleaning/fixing
2011-04-23 15:18:47 +00:00
Fabien Potencier
50d3c92e22
tweaked TemporaryStorage directory creation
2011-04-23 15:19:30 +02:00
Fabien Potencier
b69c5956d3
[Form] added missing use statement
2011-04-23 09:27:47 +02:00
Bernhard Schussek
6f1bc356a8
[Form] Refactored code from CoreExtension to new ValidatorExtension
...
CoreExtension is now independent of the Symfony2 validator.
2011-04-22 19:38:21 +02:00
Bernhard Schussek
1ce2db87e2
[Form] Added FormTypeExtensionInterface
...
With implementations of this interface, existing types can be amended.
The Csrf extension, for example, now contains a class FormTypeCsrfExtension
that adds CSRF capabilities to the "form" type.
To register new type extensions in the DIC, tag them with "form.type_extension"
and the name of the extended type as alias.
2011-04-22 19:24:38 +02:00
Bernhard Schussek
54e66c518f
[Form] Reorganized code into "form extensions"
...
The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.
new FormFactory(array(
new CoreExtension($validator, $storage),
new CsrfExtension($csrfProvider),
new DoctrineOrmExtension($em),
));
Together with a few upcoming commits this mechanism will make
* extension of the form framework in bundles and
* usage of the forms outside of Symfony2
much easier.
2011-04-22 17:41:21 +02:00
Bernhard Schussek
d152b5e265
[Form] Moved Doctrine2 specific files
2011-02-01 15:27:12 +01:00
Bernhard Schussek
3bf9f7782d
[DoctrineBundle][Form] Implemented EntityFieldFactoryGuesser
2011-02-01 15:27:12 +01:00
Bernhard Schussek
347c069e8d
[DoctrineBundle][Form] Implemented EntityChoiceField
2011-02-01 15:27:12 +01:00