Added multi-option search along.

Added auto hiding of categories in search unless selected.
Added field allowing to choose whether category auto-hidden

Fixes #353
This commit is contained in:
Matthew Smith
2019-10-16 18:23:08 +01:00
parent 2d84a598f7
commit 3de58740c6
6 changed files with 72 additions and 44 deletions

View File

@@ -10,6 +10,11 @@ class AssetForm(forms.ModelForm):
fields = '__all__'
class AssetSearchForm(forms.Form):
query = forms.CharField(required=False)
category = forms.ModelMultipleChoiceField(models.AssetCategory.objects.all(), required=False)
status = forms.ModelMultipleChoiceField(models.AssetStatus.objects.all(), required=False)
class SupplierForm(forms.Form):
class Meta:
model = models.Supplier