how and where can the feedback forms be saved when the person press on submit feedback
c481147 verified Download admin.html from drmoustafaamin/ent-evaluation-express: direct link, hf CLI and curl.
- Browser
- Download file 4.08 kB
-
https://huggingface.co/spaces/drmoustafaamin/ent-evaluation-express/resolve/main/admin.html
- Command line
-
hf download hf://spaces/drmoustafaamin/ent-evaluation-express/admin.html
-
curl -L -o admin.html https://huggingface.co/spaces/drmoustafaamin/ent-evaluation-express/resolve/main/admin.html
4.08 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Admin - Feedback Submissions</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <custom-header></custom-header> | |
| <main class="container mx-auto px-4 py-8 max-w-6xl"> | |
| <div class="bg-white rounded-xl shadow-md p-6"> | |
| <h1 class="text-2xl font-bold text-primary mb-6">Feedback Submissions</h1> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200" id="submissionsTable"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Presenter</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Session</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Ratings</th> | |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200" id="submissionsBody"> | |
| <!-- Filled by JavaScript --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </main> | |
| <custom-footer></custom-footer> | |
| <script src="components/header.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| // Load and display submissions | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const submissions = JSON.parse(localStorage.getItem('feedbackSubmissions') || '[]'); | |
| const tableBody = document.getElementById('submissionsBody'); | |
| submissions.forEach((submission, index) => { | |
| const row = document.createElement('tr'); | |
| row.className = 'hover:bg-gray-50'; | |
| const ratingsHTML = Object.entries(submission) | |
| .filter(([key]) => ['Content & Quality', 'Clarity & Organization', 'Engagement & Delivery', 'Design & Visual Appeal'].includes(key)) | |
| .map(([key, value]) => `${key}: ${value}`) | |
| .join('<br>'); | |
| row.innerHTML = ` | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${submission.Date || 'N/A'}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${submission['Presenter Name'] || 'N/A'}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${submission['Session Title'] || 'N/A'}</td> | |
| <td class="px-6 py-4 text-sm text-gray-500">${ratingsHTML}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <button onclick="deleteSubmission(${index})" class="text-red-600 hover:text-red-900">Delete</button> | |
| </td> | |
| `; | |
| tableBody.appendChild(row); | |
| }); | |
| }); | |
| window.deleteSubmission = function(index) { | |
| const submissions = JSON.parse(localStorage.getItem('feedbackSubmissions') || '[]'); | |
| submissions.splice(index, 1); | |
| localStorage.setItem('feedbackSubmissions', JSON.stringify(submissions)); | |
| location.reload(); | |
| }; | |
| </script> | |
| </body> | |
| </html> |