[EcoAccount] See recorded state of withdraw #6

* adds prefiltering of withdraws --> excludes withdraws of as deleted flagged interventions
* renders intervention-recorded icon into eco account withdraws details view
* fixes bug in case of document deleting which does not contain any files
* renames RecordForm into RecordModalForm for more clarity
This commit is contained in:
mipel
2021-08-26 15:45:24 +02:00
parent c7fd0037bd
commit 280510d729
8 changed files with 46 additions and 15 deletions

View File

@@ -359,7 +359,7 @@ class NewDocumentForm(BaseModalForm):
return doc
class RecordForm(BaseModalForm):
class RecordModalForm(BaseModalForm):
""" Modal form for recording data
"""
@@ -374,6 +374,8 @@ class RecordForm(BaseModalForm):
super().__init__(*args, **kwargs)
self.form_title = _("Record data")
self.form_caption = _("I, {} {}, confirm that all necessary control steps have been performed by myself.").format(self.user.first_name, self.user.last_name)
# Disable automatic w-100 setting for this type of modal form. Looks kinda strange
self.fields["confirm"].widget.attrs["class"] = ""
if self.instance.recorded:
# unrecord!