From 26613b6ea98dd23b88a2138fbb1f6b1abca1171c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 5 Jul 2020 22:58:52 +0200 Subject: [PATCH] core: fix application overview --- passbook/core/forms/applications.py | 3 ++- passbook/core/templates/overview/index.html | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/passbook/core/forms/applications.py b/passbook/core/forms/applications.py index 4eb071719..bf796ad1f 100644 --- a/passbook/core/forms/applications.py +++ b/passbook/core/forms/applications.py @@ -3,12 +3,13 @@ from django import forms from django.utils.translation import gettext_lazy as _ from passbook.core.models import Application, Provider +from passbook.lib.widgets import GroupedModelChoiceField class ApplicationForm(forms.ModelForm): """Application Form""" - provider = forms.ModelChoiceField( + provider = GroupedModelChoiceField( queryset=Provider.objects.all().order_by("pk").select_subclasses(), required=False, ) diff --git a/passbook/core/templates/overview/index.html b/passbook/core/templates/overview/index.html index 69df63e7d..a9aaaa069 100644 --- a/passbook/core/templates/overview/index.html +++ b/passbook/core/templates/overview/index.html @@ -24,21 +24,23 @@ {% if applications %}