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

index 5c79b1facc1bba3ef42af5ddea4ff853e039672b..258345aead7b8a6a96b4b7cca31b560621705474 100644 (file)
@@ -249,35 +249,20 @@ JS
                     'options' => [
                         'multiple' => false,
                         'accept' => 'video/*',
-                        'name' => 'video_name',
-                        'style' => 'max-width: 150px; overflow: hidden;',
-                    ],
-                    'pluginOptions' => [
-                        'showPreview' => true,
-                        'showCaption' => true,
-                        'showRemove' => true,
-                        'showUpload' => false,
-                        'browseLabel' => '',
-                        'removeLabel' => '',
-                        'cancelLabel' => '',
-                        'browseIcon' => '+',
-                        'removeIcon' => '-',
-                        'cancelIcon' => 'x',
-                        '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(
+                        'pluginOptions' => [
+                            'showPreview' => true,
+                            'showCaption' => true,
+                            'showRemove' => true,
+                            'showUpload' => false,
+                            'browseLabel' => '',
+                            'removeLabel' => '',
+                            'cancelLabel' => '',
+                            'browseIcon' => '+',
+                            'removeIcon' => '-',
+                            'cancelIcon' => 'x',
+                            'previewFileType' => 'video',
+                            'allowedFileExtensions' => ['mp4', 'mov', 'avi'],
+                            'initialPreview' => isset($model->id) ? [
                                 Files::find()
                                     ->select('url')
                                     ->where([
@@ -285,12 +270,26 @@ JS
                                         'entity_id' => $model->id
                                     ])
                                     ->scalar()
-                            ),
-                            'url' => Url::to(['delete-video', 'id' => $model->id]),
-                        ]] : [],
+                            ] : [],
+                            '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]),
+                            ]] : [],
+                        ],
+                        'style' => 'max-width: 150px; overflow: hidden;',
                     ],
                     'columnOptions' => [
-                        'style' => 'max-width: 150px;'
+                        'style' => 'max-width: 150px;',
                     ],
                 ],
                 [