8000 allow deletion in image form type · Issue #9 · symfony-cmf/media-bundle · GitHub
[go: up one dir, main page]

Skip to content 8000
allow deletion in image form type #9
@dbu

Description

@dbu

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0