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

index ea165fe8a62f72d32686ae2fa1579a5dfff579ae..05e4c50051797098b0194cf7bc56ee3cecfd24e6 100644 (file)
@@ -294,19 +294,13 @@ $this->registerJsFile('/js/heic_to_jpg_replace.js', ['position' => \yii\web\View
                                 'fileclear' => new \yii\web\JsExpression("
                                     function(event) {
                                         var modelId = " . (isset($data['id']) ? (int)$data['id'] : 'null') . ";
-                                        if (!modelId) {
-                                            alert('Не указан ID модели для удаления видео');
-                                            return;
-                                        }
                                         var deleteUrl = '" . \yii\helpers\Url::to(['write-offs-erp/delete-video']) . "?id=' + modelId;
                                         $.ajax({
                                             url: deleteUrl,
                                             type: 'POST',
                                             dataType: 'json',
                                             success: function(response) {
-                                                if (response.success) {
-                                                    alert('Видео успешно удалено');
-                                                } else {
+                                                if (!response.success) {
                                                     alert('Ошибка удаления видео');
                                                 }
                                             },