diff --git a/core/templates/core/_report_config_modal.html b/core/templates/core/_report_config_modal.html
index 177ddd7..ec653e1 100644
--- a/core/templates/core/_report_config_modal.html
+++ b/core/templates/core/_report_config_modal.html
@@ -61,20 +61,18 @@
-
-
-
+
{% for t in teams %}
-
+
{% endfor %}
@@ -132,3 +130,25 @@
if (modeCustom) modeCustom.addEventListener('change', toggleMode);
})();
+
+{# === CHOICES.JS — multi-select enhancement (admin-only) === #}
+{# Loaded CDN-only; falls back to native if the CDN fails. #}
+{% if user.is_staff or user.is_superuser %}
+
+
+
+{% endif %}
diff --git a/core/views.py b/core/views.py
index d3a560a..b557aab 100644
--- a/core/views.py
+++ b/core/views.py
@@ -430,6 +430,9 @@ def index(request):
'certs_expired_count': certs_expired_count,
'certs_expiring_count': certs_expiring_count,
'certs_alert_total': certs_alert_total,
+ # Empty on the home dashboard — modal opens clean (no pre-selected filters)
+ 'selected_project_ids': [],
+ 'selected_team_ids': [],
}
return render(request, 'core/index.html', context)
@@ -2383,6 +2386,11 @@ def generate_report(request):
# populate (same lists the Dashboard modal uses)
context['projects'] = Project.objects.all().order_by('name')
context['teams'] = Team.objects.all().order_by('name')
+ # For the modal's pre-selection: stringify the IDs so
+ # the template's `{% if p.id|stringformat:"s" in selected_project_ids %}`
+ # comparison works (Django templates compare strings to strings).
+ context['selected_project_ids'] = [str(p) for p in (project_ids or [])]
+ context['selected_team_ids'] = [str(t) for t in (team_ids or [])]
return render(request, 'core/report.html', context)