dynamic categories in contribution modal dropdown

This commit is contained in:
2026-04-20 14:21:11 +02:00
parent dbacae3f2e
commit 1eafc27c53
2 changed files with 19 additions and 10 deletions

View File

@@ -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();