From f82f4f25dda04c0c34a751d3c0335046dbbd7a8e Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Sat, 8 Nov 2025 16:27:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20ID=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D0=B8=20=D0=B2=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BA=D0=B0=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Проблема: - Код пытался найти кнопку с ID 'add-order-item-btn' - Реальный ID кнопки в шаблоне: 'add-item-btn' - Это приводило к ошибке: Cannot read properties of null (reading 'click') Решение: - Исправлен ID кнопки с 'add-order-item-btn' на 'add-item-btn' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- myproject/orders/templates/orders/order_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myproject/orders/templates/orders/order_form.html b/myproject/orders/templates/orders/order_form.html index ab8a2b7..70b6101 100644 --- a/myproject/orders/templates/orders/order_form.html +++ b/myproject/orders/templates/orders/order_form.html @@ -687,7 +687,7 @@ document.addEventListener('DOMContentLoaded', function() { modal.hide(); // Добавляем комплект в заказ через клик на кнопку добавления формы - const addButton = document.getElementById('add-order-item-btn'); + const addButton = document.getElementById('add-item-btn'); addButton.click(); // Получаем последнюю добавленную форму