diff --git a/public/index.php b/public/index.php index 1382bb8..73e8fed 100644 --- a/public/index.php +++ b/public/index.php @@ -276,13 +276,7 @@ if (!$municipality) { diff --git a/public/js/app.js b/public/js/app.js index 2fe912f..0b77bd2 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -895,11 +895,26 @@ function escapeHtml(text) { // Block 16: Application Startup // ===================================================================== -// Initialize Category Filter in Sidebar +// Populates Category Dropdown in Create Modal from Categories Object +function buildCategoryDropdown() { + var select = document.getElementById('create-category'); + for (var key in CATEGORIES) { + var cat = CATEGORIES[key]; + var option = document.createElement('option'); + option.value = key; + option.textContent = cat.icon + ' ' + cat.label; + select.appendChild(option); + } +} + +// Populates Category Dropdown +buildCategoryDropdown(); + +// Initializes Category Filter in Sidebar buildCategoryFilter(); -// Load Contributions from API +// Loads Contributions from API loadContributions(); -// Show Welcome Modal on first Visit +// Shows Welcome Modal on first Visit checkWelcomeModal(); \ No newline at end of file