From dfcecd47e0977453282f3bbe67ec9b29d2a0fcd1 Mon Sep 17 00:00:00 2001 From: HugoNeveux Date: Mon, 27 Apr 2020 19:00:49 +0200 Subject: [PATCH] Upload errors show up and can be closed properly --- PDMI/store/templates/store/upload.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PDMI/store/templates/store/upload.html b/PDMI/store/templates/store/upload.html index f076ad5..acc3b4e 100644 --- a/PDMI/store/templates/store/upload.html +++ b/PDMI/store/templates/store/upload.html @@ -66,8 +66,10 @@ $('#multiFileUpload').dropzone({ let res = eval('(' + data.xhr.responseText + ')'); }); this.on("error", function(file, message) { - $('.alert').html(''); - $('#errorZone').append(message.error); + if ($('#errorMsg').length > 0) { + $('#errorMsg').remove(); + } + $('#errorZone').append(`${message.error}`); $('#errorZone').show(); }); this.on('sending', function(file, xhr, formData) {