]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-417
authormarina <m.zozirova@gmail.com>
Wed, 28 May 2025 12:21:45 +0000 (15:21 +0300)
committermarina <m.zozirova@gmail.com>
Wed, 28 May 2025 12:21:45 +0000 (15:21 +0300)
erp24/web/js/validate/validateForm.js

index 0c98f89417340b44a186b1a5ed07e00e26ccb885..980f3754d28b9aec5d59be08aed1e95f155d30ea 100755 (executable)
@@ -44,6 +44,8 @@ $(".form-validate button").click(function (e) {
                 errors['__common'].push('Пожалуйста, добавьте хотя бы одно фото к каждому списанию перед сохранением.');
             }
 
+            console.log('Ошибки перед alert:', errors);
+
             if (Object.keys(errors).length > 0) {
                 renderErrors(errors);
                 let allErrors = [];
@@ -54,6 +56,9 @@ $(".form-validate button").click(function (e) {
                         allErrors.push(errors[key]);
                     }
                 }
+
+                console.log('Собранные ошибки для alert:', allErrors);
+
                 alert(allErrors.join('\n'));
             } else {
                 yiiform.off('submit');
@@ -88,4 +93,4 @@ $(".form-validate button").click(function (e) {
         var strOut2 = messages.join(', <br>');
         $('.messages').html(strOut2);
     }
-});
+});
\ No newline at end of file