From: Vincent Vanwaelscappel Date: Tue, 8 Feb 2022 19:07:47 +0000 (+0100) Subject: wip #5041 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f22c689cd1b6719cad3dc5e106f70dd319d7b5a4;p=cubist_cms-back.git wip #5041 @1 --- diff --git a/src/app/Magic/Fields/Files.php b/src/app/Magic/Fields/Files.php index 1b926c5..85eb2d9 100644 --- a/src/app/Magic/Fields/Files.php +++ b/src/app/Magic/Fields/Files.php @@ -51,7 +51,6 @@ class Files extends Field if (is_array($accepted)) { $this->setAttribute('options.acceptedFiles', implode(',', $accepted)); } - } protected function _getAttributesAliases() diff --git a/src/public/bunchmultiple/bunchmultiple.js b/src/public/bunchmultiple/bunchmultiple.js index c10b8a0..dd53a01 100644 --- a/src/public/bunchmultiple/bunchmultiple.js +++ b/src/public/bunchmultiple/bunchmultiple.js @@ -119,7 +119,16 @@ var item = $(this).closest('.item'); var form = item.find('.subform'); var txt = $(this).data('legend').replace(/\%([a-zA-Z0-9_]+)/gm, function (match, varname) { - return form.find('[name="' + varname + '"]').val(); + + var input = form.find('[name="' + varname + '"]'); + + if (input.length === 0) { + input = form.find('[name="' + form.data('bmid') + '___' + varname + '"]'); + console.log(input); + } + var res = $(input).val(); + + return res; }); $(this).text(txt); }); diff --git a/src/resources/views/fields/dropzone_media.blade.php b/src/resources/views/fields/dropzone_media.blade.php index c516cb3..768f07a 100644 --- a/src/resources/views/fields/dropzone_media.blade.php +++ b/src/resources/views/fields/dropzone_media.blade.php @@ -3,17 +3,17 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? ?> @if(isset($entry)) -
- {{ $field['label'] }}
- -
-
- {{__('Drop files here or click to upload')}} -
+ @include('crud::fields.inc.wrapper_start') + {{ $field['label'] }}
+ +
+
+ {{__('Drop files here or click to upload')}}
+ @include('crud::fields.inc.wrapper_end') {{-- ########################################## --}} {{-- Extra CSS and JS for this particular field --}} @@ -226,7 +226,7 @@ $collection = old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? } }); } - + function initOneDropzone(el) { el = $(el); var base_url = el.data('url');