4
4
from datasources .models import SourceSubdivision
5
5
from signals .models import (
6
6
ActiveChoices ,
7
- FormatChoices ,
8
7
Pathogen ,
9
8
Signal ,
10
9
TimeTypeChoices ,
10
+ GeographicScope ,
11
+ SeverityPyramidRungsChoices ,
11
12
)
12
13
13
14
@@ -27,10 +28,11 @@ class SignalFilterForm(forms.ModelForm):
27
28
search = forms .CharField (min_length = 3 )
28
29
pathogen = forms .ModelChoiceField (queryset = Pathogen .objects .all (), widget = forms .CheckboxSelectMultiple ())
29
30
active = forms .TypedMultipleChoiceField (choices = ActiveChoices .choices , coerce = bool , widget = forms .CheckboxSelectMultiple ())
30
- format_type = forms .ChoiceField (choices = FormatChoices .choices , widget = forms .CheckboxSelectMultiple ())
31
31
source = forms .ModelMultipleChoiceField (queryset = SourceSubdivision .objects .all (), widget = forms .CheckboxSelectMultiple ())
32
32
time_type = forms .ChoiceField (choices = TimeTypeChoices .choices , widget = forms .CheckboxSelectMultiple ())
33
33
base_signal = forms .ChoiceField (choices = [('' , _ ('All' )), (True , _ ('Yes' )), (False , _ ('No' ))], required = False , widget = forms .RadioSelect ())
34
+ geographic_scope = forms .ModelMultipleChoiceField (queryset = GeographicScope .objects .all (), widget = forms .CheckboxSelectMultiple ())
35
+ severenity_pyramid_rungs = forms .ChoiceField (choices = SeverityPyramidRungsChoices .choices , widget = forms .CheckboxSelectMultiple ())
34
36
35
37
class Meta :
36
38
model = Signal
@@ -41,11 +43,10 @@ class Meta:
41
43
'pathogen' ,
42
44
'active' ,
43
45
'available_geography' ,
44
- 'category' ,
45
- 'format_type' ,
46
- 'signal_type' ,
46
+ 'severenity_pyramid_rungs' ,
47
47
'source' ,
48
48
'time_type' ,
49
+ 'geographic_scope' ,
49
50
]
50
51
51
52
widgets = {
@@ -60,21 +61,6 @@ class Meta:
60
61
'data-bs-toggle' : 'tooltip' ,
61
62
'data-bs-placement' : 'bottom' ,
62
63
}),
63
- 'signal_type' : forms .CheckboxSelectMultiple (attrs = {
64
- 'class' : 'form-select' ,
65
- 'data-bs-toggle' : 'tooltip' ,
66
- 'data-bs-placement' : 'bottom' ,
67
- }),
68
- 'category' : forms .CheckboxSelectMultiple (attrs = {
69
- 'class' : 'form-select' ,
70
- 'data-bs-toggle' : 'tooltip' ,
71
- 'data-bs-placement' : 'bottom' ,
72
- }),
73
- 'format_type' : forms .CheckboxSelectMultiple (attrs = {
74
- 'class' : 'form-select' ,
75
- 'data-bs-toggle' : 'tooltip' ,
76
- 'data-bs-placement' : 'bottom' ,
77
- }),
78
64
'source' : forms .CheckboxSelectMultiple (attrs = {
79
65
'class' : 'form-select' ,
80
66
'data-bs-toggle' : 'tooltip' ,
0 commit comments