mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 06:22:16 +00:00
Various UX Improvements
Also rearranged asset detail/edit to be more space efficient
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user