],
// 'items' => [0,1],
],
- [
- 'name' => 'imageFiles',
- 'title' => 'Фотографии: jpg и png',
- 'type' => FileInput::className(),
- 'options' => [
- 'options' => [
- 'multiple' => true,
- 'accept' => 'image/*',
- 'name' => 'image_name',
- 'capture' => '',
- 'class' => 'file',
- 'required' => true,
- ],
- 'pluginOptions' => [
- 'showPreview' => true,
- 'showCaption' => true, // ✅ Должно быть true
- 'initialCaption' => '55656',
- 'initialPreview' => '809',
-// 'initialPreviewConfig' => function($data) {
-// if (!$data || !isset($data['id'])) return [];
-// $file = Files::findOne([
-// 'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
-// 'entity_id' => $data['id']
-// ]);
-// return $file ? [[
-// 'caption' => basename($file->url), // ✅ Обязательно!
-// 'type' => 'video',
-// 'size' => @filesize(Yii::getAlias('@webroot') . $file->url),
-// ]] : [];
-// },
- 'browseIcon' => '+',
- 'cancelIcon' => 'x',
- 'removeIcon' => '-',
- 'buttonLabelClass' => 'hidden',
-// 'browseIcon' => '<i class="glyphicon glyphicon-picture 12345"></i>',
- 'fileActionSettings' => ['showUpload' => false],
- 'maxFileCount' => 10,
- 'multiple' => true
- ],
- 'model' => $multipleUploadForm,
- ],
- 'columnOptions' => [
- 'class' => 'custom_css_class_file_input'
- ]
- ],
[
'name' => 'images_row',
'type' => BaseColumn::TYPE_STATIC,