Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow deletion in image form type #9

Open
dbu opened this issue Jun 21, 2013 · 0 comments
Open

allow deletion in image form type #9

dbu opened this issue Jun 21, 2013 · 0 comments
Milestone

Comments

@dbu
Copy link
Member

dbu commented Jun 21, 2013

follow up of doctrine/DoctrinePHPCRBundle#37 - @rmsint proposed to use a form listener and handling code to handle deleting an image again.

right now the only way to delete an image is by deleting the document containing the image. this follows the idea of http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html - if the image is null (meaning we did not upload a new one) that information is simply ignored.

the proposition is to have a listener to show a checkbox removeImage that is mapped to the document and calls setRemoveImage if checked, having a way to know that the user explicitly wanted to delete the image. rmsint wrote a gist for that: https://gist.github.com/rmsint/ad4d8804e3ae6fae2160

(ported over from doctrine/DoctrinePHPCRBundle#40 and not a show stopper for 1.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants