Various UX Improvements

Also rearranged asset detail/edit to be more space efficient
This commit is contained in:
2020-02-16 15:37:09 +00:00
parent ed5339925e
commit 54ec38f7e1
7 changed files with 28 additions and 10 deletions

View File

@@ -20,6 +20,12 @@ class AssetForm(forms.ModelForm):
self.fields['date_acquired'].widget.format = '%Y-%m-%d'
# Needed to prevent assets losing parent data on audit
class AssetAuditForm(AssetForm):
class Meta(AssetForm.Meta):
# TODO Inherit exlcusions from superclass
exclude = ['asset_id_prefix', 'asset_id_number', 'last_audited_at', 'last_audited_by', 'parent']
class AssetSearchForm(forms.Form):
query = forms.CharField(required=False)
category = forms.ModelMultipleChoiceField(models.AssetCategory.objects.all(), required=False)