Feat: Автооткрытие modal редактирования из списка
✅ При клике на ✏️ из списка → #edit в URL ✅ JavaScript открывает modal при загрузке ✅ Bootstrap 5 Modal API Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
932035f3e4
commit
7da4b1a2cf
|
|
@ -247,6 +247,14 @@
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
|
// Автоматическое открытие modal редактирования если в URL есть #edit
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
if (window.location.hash === '#edit') {
|
||||||
|
const editModal = new bootstrap.Modal(document.getElementById('editAssignmentModal'));
|
||||||
|
editModal.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// AJAX добавление
|
// AJAX добавление
|
||||||
function setupAjaxForm(formId, type) {
|
function setupAjaxForm(formId, type) {
|
||||||
document.getElementById(formId).addEventListener('submit', function(e) {
|
document.getElementById(formId).addEventListener('submit', function(e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue