media-bundle icon indicating copy to clipboard operation
media-bundle copied to clipboard

image require on new document but not when existing

Open dbu opened this issue 12 years ago • 0 comments

when a file upload field is required, it means the user must re-upload an image each time he submits the form. to edit a document that has an image field, which is inconvenient. the intended behaviour is that if the parent entity is new, the image is required, but otherwise it is optional. i tried to make the phpcr_odm_image form type handle that but only found a horrible hack https://gist.github.com/dbu/5142035

see also discussion in https://groups.google.com/forum/?fromgroups#!topic/symfony2/CrooBoaAlO4

(this is an issue in the code ported over from DoctrinePHPCRBundle https://github.com/doctrine/DoctrinePHPCRBundle/issues/43 - i think its no blocker for 1.0)

dbu avatar Jun 21 '13 08:06 dbu