Browse Source

[FIX] check on existing dropzone

experimental
Georgi Hristov 4 years ago
parent
commit
a5584cdda5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/Utils/FileUpload/Dropzone.php

+ 1
- 1
modules/Utils/FileUpload/Dropzone.php View File

@@ -65,7 +65,7 @@ class Utils_FileUpload_Dropzone extends Module
'acceptedFiles' => $this->acceptedFiles,
'dictDefaultMessage' => __('Drop files here or click to upload')
];
eval_js('jq(".dz-hidden-input").remove(); if (!document.querySelector("#' . $identifier . '").dropzone) {
eval_js('jq(".dz-hidden-input").remove(); if (document.querySelector("#' . $identifier . '") && !document.querySelector("#' . $identifier . '").dropzone) {
var dz = new Dropzone("#' . $identifier . '", '.json_encode($options).');
dz.on("removedfile", function(file) {
jq.ajax({


Loading…
Cancel
Save