// frontend/static/js/modal.js // static/js/modal.js function createModal(title, content, onSave = null) { const modal = document.createElement('div'); modal.className = 'fixed inset-0 bg-gray-500 bg-opacity-75 flex items-center justify-center z-50'; modal.innerHTML = `

${title}

${content}
${onSave ? ` ` : ''}
`; document.body.appendChild(modal); return modal; } function closeModal(button) { const modal = button.closest('.fixed'); if (modal) { modal.remove(); } }