fix(products): improve bulk category modal behavior and initialization

- Move default date initialization from form to view initial data
- Add checks for DOM elements existence before event listener attachment
- Handle 'clear' mode in bulk category modal with confirmation and API call
- Improve CSRF token usage and error handling during bulk update requests
- Remove deprecated handleClearAll function and integrate logic into handleApply
- Reset modal state properly including input fields and radio button modes
- Update modal JS file version reference in products list template
This commit is contained in:
2026-01-10 11:41:37 +03:00
parent 0d6d62d1ad
commit 5f565555e3
4 changed files with 136 additions and 126 deletions

View File

@@ -486,5 +486,5 @@
{% block extra_js %}
{% load static %}
<script src="{% static 'products/js/batch-selection.js' %}?v=1.2"></script>
<script src="{% static 'products/js/bulk-category-modal.js' %}?v=1.4"></script>
<script src="{% static 'products/js/bulk-category-modal.js' %}?v=1.6"></script>
{% endblock %}