Minor enhancements

* refactors eco account rest surface calculation into designated method get_available_rest()
* refactors placeholder setter for BaseForm
* adds automatic eco account identifier generating on saving
* fixes ServerMessageImportance template tag
This commit is contained in:
mipel
2021-08-11 14:17:43 +02:00
parent c95e451520
commit df70f99ca4
8 changed files with 77 additions and 15 deletions

View File

@@ -481,7 +481,7 @@ class NewWithdrawForm(BaseModalForm):
self.is_intervention_initially = False
# Add a placeholder for field 'surface' without having to define the whole widget above
self.fields["surface"].widget.attrs["placeholder"] = "0,00"
self.add_placeholder_for_field("surface", "0,00")
# Check for Intervention or EcoAccount
if isinstance(self.instance, Intervention):