symfony2admingenerator / AvocodeFormExtensionsBundle

(old-legacy) Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
48 stars 31 forks source link

Only reset the image, not the complete form #150

Closed bobvandevijver closed 9 years ago

bobvandevijver commented 9 years ago

The current code resets the complete form whenever the reset button is in the single upload widget. As the button only appears when the file is changed, I classify it as unwanted behaviour to reset the complete form when you only want to cancel the file change. To cancel the whole form you need to place a reset button at the bottom (or top, or whatever).

Simply removing the button property will result in an automatic submit (I'm not sure why), but just changing it to the type button fixes the problem.

bobvandevijver commented 9 years ago

@loostro Can you look at this PR? And preferrably merge it? :)

sescandell commented 9 years ago

Thank you @bobvandevijver