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 p in projects %} - + {% endfor %}
- {% 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 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)