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

Delete confirm #792

Merged
merged 5 commits into from
Aug 19, 2020
Merged

Delete confirm #792

merged 5 commits into from
Aug 19, 2020

Conversation

qadan
Copy link

@qadan qadan commented Aug 17, 2020

What does this Pull Request do?

Allows for a confirmation screen for the 'Delete media and files' action. Also reworks the action a little to be more in line with other entity delete actions.

What's new?

  • A new route, /media/delete_with_files, which acts as a confirmation form for bulk deleting media with associated files and translations. This route doesn't accept parameters; rather, it relies on the media_and_file_delete_confirm temporary storage for the current user to know what was checked off.
  • A new confirm form is what actually runs the bulk delete of media, associated files, and media translations.

How should this be tested?

With Islandora enabled:

  • Create at least two media, with attached files.
  • Go to /admin/content/media/
  • From the bulk operations drop-down, select 'Delete media and file(s)'
  • Check off your new media
  • Click 'Apply to selected items'
  • You should be brought to a confirmation form that asks you whether you want to delete the selected media and associated files
  • Click 'Delete'
  • Check that the media and associated files have been deleted, along with any translations.

Additional Notes:

This represents something of a departure from the existing action in that the execute() action no longer immediately deletes the given entities. This doesn't appear to be run anywhere programmatically in the codebase, but it's worth mentioning in case someone somewhere is trying to run this programmatically.

Interested parties

@Islandora/8-x-committers

Copy link

@mjordan mjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as advertised. Thanks!

@ajstanley ajstanley merged commit 3f58dfd into Islandora:8.x-1.x Aug 19, 2020
@ajstanley
Copy link

Does what it says on the tin.

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

Successfully merging this pull request may close these issues.

3 participants