From 7b481c13276051a9a3fa5e8fcd46a87f96cd3daf Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 9 Sep 2024 12:51:10 +0100 Subject: [PATCH] order supervisors --- generic/views.py | 2 +- rad/static/css/anatomy.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/generic/views.py b/generic/views.py index b15bc155..9ead2903 100644 --- a/generic/views.py +++ b/generic/views.py @@ -2623,7 +2623,7 @@ class SupervisorAutocomplete(autocomplete.Select2QuerySetView): if not self.request.user.is_authenticated: return Supervisor.objects.none() - qs = Supervisor.objects.all() + qs = Supervisor.objects.all().order_by("name") if self.q: # This raises a fielderror which breaks creating a new item if not caught diff --git a/rad/static/css/anatomy.css b/rad/static/css/anatomy.css index e3592340..092af7f8 100644 --- a/rad/static/css/anatomy.css +++ b/rad/static/css/anatomy.css @@ -1282,4 +1282,9 @@ tr:has(> td > a) { .hover-highlight:hover { opacity: 100%; color:purple; +} + +/* For crispy... */ +.select2-selection { + padding-bottom: 30px; } \ No newline at end of file