diff --git a/public/admin.php b/public/admin.php index 37ea501..56c9be1 100644 --- a/public/admin.php +++ b/public/admin.php @@ -538,6 +538,74 @@ $counts['total'] = count($all_contributions); + + + + +
+ + + + + + + + + + + diff --git a/public/js/admin.js b/public/js/admin.js index bc7f08a..beb3925 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -319,6 +319,22 @@ function escapeHtml(text) { return div.innerHTML; } + +// Closes Admin Modals by ID +function closeAdminModal(modalId) { + document.getElementById(modalId).style.display = 'none'; +} + +// Closes Admin Modals on Escape Key +document.addEventListener('keydown', function (e) { + if (e.key === 'Escape') { + document.querySelectorAll('.modal-overlay').forEach(function (modal) { + modal.style.display = 'none'; + }); + } +}); + + // ===================================================================== // Block 9: CRUD Operations for Contributions // ===================================================================== @@ -354,45 +370,36 @@ function changeStatus(contributionId, newStatus) { // UPDATE: Edits existing Contributions function editContribution(contributionId, currentTitle, currentDescription) { - Swal.fire({ - title: 'Beitrag bearbeiten', - html: - '