]> _ Git - cubist_cms-back.git/commitdiff
wip #5045 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Jan 2022 16:27:54 +0000 (17:27 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 28 Jan 2022 16:27:54 +0000 (17:27 +0100)
src/app/Magic/Fields/Files.php
src/resources/views/fields/dropzone_media.blade.php

index e9a9065e27dc10172f47fb049f9d56e0630fe02c..1b926c5ca49351df580a5577e70c10172d20b55d 100644 (file)
@@ -47,6 +47,11 @@ class Files extends Field
             $this->setAttribute('default', $name);
         }
 
+        $accepted = $this->getAttribute('options.acceptedFiles');
+        if (is_array($accepted)) {
+            $this->setAttribute('options.acceptedFiles', implode(',', $accepted));
+        }
+
     }
 
     protected function _getAttributesAliases()
index 8344b31d365210824afafcc3413aa8e351ce855f..c516cb3db14ede8064b6db7f38ea35285a823fc3 100644 (file)
@@ -226,11 +226,9 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ??
                             }
                         });
                     }
-
-
+                    
                     function initOneDropzone(el) {
                         el = $(el);
-                        console.log(el);
                         var base_url = el.data('url');
                         var el_id = $(el).attr('id');
                         var collection = $(el).prev().val();
@@ -331,7 +329,6 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ??
                         };
 
                         var options = jQuery.extend(dOptions, $(el).data('options'));
-                        console.log(options);
                         var dropzone = new Dropzone("#" + el_id, options);
 
                         dropzone.on("maxfilesexceeded", function (file) {