From: marina Date: Wed, 28 May 2025 06:57:14 +0000 (+0300) Subject: ERP-417 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b58d4433da4c8667947de584b3b2d5569a2fff60;p=erp24_rep%2Fyii-erp24%2F.git ERP-417 --- diff --git a/erp24/views/write_offs_erp/_form.php b/erp24/views/write_offs_erp/_form.php index b7cf784b..58eb6a9b 100644 --- a/erp24/views/write_offs_erp/_form.php +++ b/erp24/views/write_offs_erp/_form.php @@ -34,35 +34,6 @@ use yii_app\records\WriteOffsProductsErp; $this->registerJsFile('/js/validate/validateForm.js', ['position' => \yii\web\View::POS_END]); $this->registerJsFile('/js/heic2any.min.js', ['position' => \yii\web\View::POS_END]); $this->registerJsFile('/js/heic_to_jpg_replace.js', ['position' => \yii\web\View::POS_END]); - -$js = << 0; - - let fileInput = row.find('.list-cell__imageFiles input[type="file"]'); - let hasFilesSelected = fileInput.length && fileInput[0].files.length > 0; - - if (!hasImageInRow && !hasFilesSelected) { - allRowsHaveImage = false; - return false; - } - }); - - if (!allRowsHaveImage) { - e.preventDefault(); - alert('Пожалуйста, добавьте хотя бы одно фото к каждому списанию перед сохранением.'); - return false; - } - }); -}); -JS; - -$this->registerJs($js, \yii\web\View::POS_READY); ?>