From: fomichev Date: Wed, 22 Apr 2026 07:13:27 +0000 (+0300) Subject: fix marking X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=9136f5a74ff3ed726ca014fa3200c55a8ecc73e5;p=erp24_rep%2Fyii-erp24%2F.git fix marking --- diff --git a/erp24/views/marking/index.php b/erp24/views/marking/index.php index 103f376f..ee9bbe84 100644 --- a/erp24/views/marking/index.php +++ b/erp24/views/marking/index.php @@ -108,9 +108,13 @@ if (!empty($markings)) { getStatusBadge() ?> - - - + is_active): ?> + + + + + + is_active): ?> ' + messages[0] + ''); }); + } else { + \$saveBtn.prop('disabled', false); + alert(resp.message || 'Ошибка сохранения'); } }, - error: function() { alert('Ошибка сервера'); } + error: function() { + \$saveBtn.prop('disabled', false); + alert('Ошибка сервера'); + } }); }); - $(document).on('click', '.btn-marking-delete', function(e) { + \$(document).on('click.markingtab', '.btn-marking-delete', function(e) { e.preventDefault(); - var id = $(this).data('id'); - var code = $(this).data('code'); + var id = \$(this).data('id'); + var code = \$(this).data('code'); if (!confirm('Деактивировать маркировку "' + code + '"?')) { return; } - $.ajax({ + \$.ajax({ url: '{$deleteUrl}?id=' + id, type: 'POST', data: {_csrf: yii.getCsrfToken()}, @@ -251,10 +287,9 @@ $js = <<