From 0ed48f5c835e4dddfaa00d247756b84ddfc17885 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 17 Oct 2021 19:07:21 +0100 Subject: [PATCH] . --- anatomy/forms.py | 3 ++- anatomy/templates/anatomy/anatomyquestion_form.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/anatomy/forms.py b/anatomy/forms.py index b33ebba3..61e5951e 100644 --- a/anatomy/forms.py +++ b/anatomy/forms.py @@ -22,7 +22,7 @@ from .models import ( ) from generic.models import Examination -from django.contrib.admin.widgets import FilteredSelectMultiple +from django.contrib.admin.widgets import FilteredSelectMultiple, FilteredSelectSingle from django.forms.widgets import RadioSelect, TextInput, Textarea @@ -78,6 +78,7 @@ class AnatomyQuestionForm(ModelForm): self.fields["region"] = ModelChoiceField( required=False, queryset=Region.objects.all(), + widget=FilteredSelect(verbose_name="Region", is_stacked=False), ) self.fields["modality"] = ModelChoiceField( diff --git a/anatomy/templates/anatomy/anatomyquestion_form.html b/anatomy/templates/anatomy/anatomyquestion_form.html index f5996a5e..5a517d19 100644 --- a/anatomy/templates/anatomy/anatomyquestion_form.html +++ b/anatomy/templates/anatomy/anatomyquestion_form.html @@ -20,7 +20,7 @@ } function closePopup(win, newID, newRepr, id) { console.log(id) - $(id + "_to").append('') + $(id).append('') win.close(); }