From d50fbaafd68abc4cad2d07398b797603d2a9c597 Mon Sep 17 00:00:00 2001 From: Ross Date: Sat, 18 May 2024 18:11:12 +0100 Subject: [PATCH] . --- rcr/forms.py | 5 ++++- rcr/templates/rcr/item_update.html | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/rcr/forms.py b/rcr/forms.py index 5d8cf27d..e0870bda 100644 --- a/rcr/forms.py +++ b/rcr/forms.py @@ -17,13 +17,16 @@ from django.forms import ( from rcr.models import Item, RadiologyCategory, OncologyCategory, Level from django.contrib.auth.models import User from atlas.models import Condition +from django.contrib.admin.widgets import FilteredSelectMultiple class ItemForm(ModelForm): #radiology_category = ModelMultipleChoiceField(queryset=RadiologyCategory.objects.all()) #oncology_category = ModelMultipleChoiceField(queryset=OncologyCategory.objects.all()) - radiology_condition = ModelMultipleChoiceField(queryset=Condition.objects.filter(rcr_curriculum=True), required=False) + radiology_condition = ModelMultipleChoiceField(queryset=Condition.objects.filter(rcr_curriculum=True), required=False, + widget=FilteredSelectMultiple(verbose_name="Condition", is_stacked=False), + ) diff --git a/rcr/templates/rcr/item_update.html b/rcr/templates/rcr/item_update.html index 0acd91b8..4753e2e2 100644 --- a/rcr/templates/rcr/item_update.html +++ b/rcr/templates/rcr/item_update.html @@ -35,3 +35,22 @@ } {% endblock css %} + +{% block js %} + + + +{% endblock js %}