]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-417
authormarina <m.zozirova@gmail.com>
Tue, 27 May 2025 06:27:49 +0000 (09:27 +0300)
committermarina <m.zozirova@gmail.com>
Tue, 27 May 2025 06:27:49 +0000 (09:27 +0300)
erp24/views/write_offs_erp/_form.php

index cead9a2f9c235e054764d7734f5c06c5ee68da08..2593b3b237670238f9506ecb14509bf2011af94f 100644 (file)
@@ -217,7 +217,6 @@ JS
                     'name' => 'imageFiles',
                     'title' => 'Фотографии: jpg и png',
                     'type' => FileInput::className(),
-                    'columnOptions' => ['style' => 'width: 120px'],
                     'options' => [
                         'options' => [
                             'multiple' => true,
@@ -254,55 +253,55 @@ JS
                     ]
                 ],
                 [
-                    'name' => 'videoFiles',
-                    'title' => 'Видео: mp4, mov, avi',
-                    'type' => FileInput::class,
-                    'options' => [
-                        'options' => [
-                            'multiple' => false,
-                            'accept' => 'video/*',
-                            'name' => 'video_name',
-                        ],
-                        'pluginOptions' => [
-                            'showPreview' => true,
-                            'showCaption' => false,
-                            'showRemove' => true,
-                            'showUpload' => false,
-                            'browseIcon' => '+',
-                            'cancelIcon' => 'x',
-                            'removeIcon' => '-',
-                            'buttonLabelClass' => 'hidden',
-                            'fileActionSettings' => [
-                                'showUpload' => false
-                            ],
-                            'previewFileType' => 'video',
-                            'allowedFileExtensions' => ['mp4', 'mov', 'avi'],
-                            'initialPreview' => isset($model->id) ? [
-                                Files::find()
-                                    ->select('url')
-                                    ->where([
-                                        'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
-                                        'entity_id' => $model->id
-                                    ])
-                                    ->scalar()
-                            ] : [],
-                            'initialPreviewAsData' => true,
-                            'initialPreviewConfig' => isset($model->id) ? [[
-                                'type' => 'video',
-                                'caption' => basename(
-                                    Files::find()
-                                        ->select('url')
-                                        ->where([
-                                            'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
-                                            'entity_id' => $model->id
-                                        ])
-                                        ->scalar()
-                                ),
-                                'url' => Url::to(['delete-video', 'id' => $model->id]),
-                            ]] : [],
-                        ]
-                    ]
-                ],
+    'name' => 'videoFiles',
+    'title' => 'Видео: mp4, mov, avi',
+    'type' => FileInput::class,
+    'options' => [
+        'options' => [
+            'multiple' => false,
+            'accept' => 'video/*',
+            'name' => 'video_name',
+        ],
+        'pluginOptions' => [
+            'showPreview' => true,
+            'showCaption' => false,
+            'showRemove' => true,
+            'showUpload' => false,
+            'browseIcon' => '+',
+            'cancelIcon' => 'x',
+            'removeIcon' => '-',
+            'buttonLabelClass' => 'hidden',
+            'fileActionSettings' => [
+                'showUpload' => false
+            ],
+            'previewFileType' => 'video',
+            'allowedFileExtensions' => ['mp4', 'mov', 'avi'],
+            'initialPreview' => isset($model->id) ? [
+                Files::find()
+                    ->select('url')
+                    ->where([
+                        'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
+                        'entity_id' => $model->id
+                    ])
+                    ->scalar()
+            ] : [],
+            'initialPreviewAsData' => true,
+            'initialPreviewConfig' => isset($model->id) ? [[
+                'type' => 'video',
+                'caption' => basename(
+                    Files::find()
+                        ->select('url')
+                        ->where([
+                            'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
+                            'entity_id' => $model->id
+                        ])
+                        ->scalar()
+                ),
+                'url' => Url::to(['delete-video', 'id' => $model->id]),
+            ]] : [],
+        ]
+    ]
+],
                 [
                     'name' => 'comment',
                     'type' => 'textInput',