Feat: Автооткрытие modal редактирования из списка

 При клике на ✏️ из списка → #edit в URL
 JavaScript открывает modal при загрузке
 Bootstrap 5 Modal API

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mirivlad 2026-03-31 09:37:48 +08:00
parent 932035f3e4
commit 7da4b1a2cf
1 changed files with 8 additions and 0 deletions

View File

@ -247,6 +247,14 @@
@push('scripts')
<script>
// Автоматическое открытие modal редактирования если в URL есть #edit
document.addEventListener('DOMContentLoaded', function() {
if (window.location.hash === '#edit') {
const editModal = new bootstrap.Modal(document.getElementById('editAssignmentModal'));
editModal.show();
}
});
// AJAX добавление
function setupAjaxForm(formId, type) {
document.getElementById(formId).addEventListener('submit', function(e) {