From 7e90c17dc2ee1fad1cfdff3a7c07a8c51d1e0f56 Mon Sep 17 00:00:00 2001 From: marina Date: Tue, 27 May 2025 09:17:54 +0300 Subject: [PATCH] ERP-417 --- erp24/views/write_offs_erp/_form.php | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/erp24/views/write_offs_erp/_form.php b/erp24/views/write_offs_erp/_form.php index f2992ae9..b6e4f8a4 100644 --- a/erp24/views/write_offs_erp/_form.php +++ b/erp24/views/write_offs_erp/_form.php @@ -213,6 +213,45 @@ JS // 'style' => 'width: 70px;', ] ], + [ + 'name' => 'imageFiles', + 'title' => 'Фотографии: jpg и png', + 'type' => FileInput::className(), + 'options' => [ + 'options' => [ + 'multiple' => true, + 'accept' => 'image/*', + 'name' => 'image_name', + 'capture' => '', + 'class' => 'file' + ], + 'pluginOptions' => [ +// 'previewFileType' => ['jpg','png'], +// 'allowedFileExtensions'=>['jpg','png'], + 'showPreview' => false, + 'showCaption' => true, + 'showRemove' => true, + 'showUpload' => false, + //'uploadClass' => 'hide', +// 'initialPreview'=> $initalImages, + 'overwriteInitial' => true, + +// 'initialPreviewAsData'=>true, + //initialPreviewAsData: false, +// 'bsColCssPrefixes'=>3, + // 'uploadUrl' => Url::to(['/site/image-manager-upload']), + 'browseIcon' => '+', + 'cancelIcon' => 'x', + 'removeIcon' => '-', + 'buttonLabelClass' => 'hidden', +// 'browseIcon' => '', + 'fileActionSettings' => ['showUpload' => false], + 'maxFileCount' => 10, + 'multiple' => true + ], + 'model' => $multipleUploadForm, + ] + ], [ 'name' => 'videoFiles', 'title' => 'Видео: mp4, mov, avi', @@ -227,7 +266,7 @@ JS return $file ? $file->url : null; }, - 'columnOptions' => function($rowModel, $index, $context) { + 'columnOptions' => function ($rowModel, $index, $context) { $file = null; $initialPreview = []; $initialPreviewConfig = []; -- 2.39.5