orchidsoftware / orchidsoftware/platform

Confirmation before removing uploaded Attachments

Open
#2,010 1 comment 0 reactions 1 assignee View on GitHub

@tabuna is already working on this.

Since Dec 18, 2021.

Dominant language
PHP
Stars
4.8k
Forks
662
Avg merge
1d 9h
Merged PRs (30d)
7

Description

Is your feature request related to a problem? Please describe.

The upload field shows a preview of uploaded files. Also shows an (x) button to remove individual files!
Also the similar preview thumbs are displayed for already uploaded Attachments.
CleanShot 2021-12-19 at 04 21 52@2x

Now the problem is, if I click on the delete icon (x) of a thumb, it removes immediately.
If we could display a confirmation before deleting an uploaded image, that would be great!

Describe the solution you'd like
After clicking on the (x) icons, the system will ask for confirmation like "Are you sure to delete this file?"
Also the message can be configurable, like:

Upload::make('upload')
    ->maxFileSize(1024)
    ->deleteConfirmation("Are you sure to delete this product image?")
;

Describe alternatives you've considered
I'm stuck at this point 😓. Tried invoking dropzone confirmation by setting dictRemoveFileConfirmation, but it didn't work.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.