Disable implicit delete of attachments for signature
authorCyperghost <olaf_schmitz_1@t-online.de>
Tue, 23 Jan 2024 11:24:49 +0000 (12:24 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Tue, 23 Jan 2024 11:24:49 +0000 (12:24 +0100)
wcfsetup/install/files/js/WCF.Attachment.js

index 097d768721e084669bc247f9a1f2aa82a567a78b..1eec070391886f5ea352d870b289c339c9da6d23 100644 (file)
@@ -118,6 +118,11 @@ WCF.Attachment.Upload = WCF.Upload.extend({
                                { listenToCkeditor },
                        ) => {
                                const discardAllAttachments = () => {
+                                       // Disable the implicit deletion of signature attachments.
+                                       if (objectType === "com.woltlab.wcf.user.signature") {
+                                               return;
+                                       }
+
                                        this._fileListSelector[0]
                                                        .querySelectorAll('li:not(.uploadFailed) .jsObjectAction[data-object-action="delete"]')
                                                        .forEach((button) => {