@@ -113,6 +113,7 @@ class EditPaymentModalForm(NewPaymentForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.payment = kwargs.pop("payment", None)
|
||||
super().__init__(*args, **kwargs)
|
||||
self.form_title = _("Edit payment")
|
||||
form_date = {
|
||||
"amount": self.payment.amount,
|
||||
"due": str(self.payment.due_on),
|
||||
@@ -268,6 +269,7 @@ class EditCompensationStateModalForm(NewStateModalForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.state = kwargs.pop("state", None)
|
||||
super().__init__(*args, **kwargs)
|
||||
self.form_title = _("Edit state")
|
||||
form_data = {
|
||||
"biotope_type": self.state.biotope_type,
|
||||
"biotope_extra": self.state.biotope_type_details.all(),
|
||||
@@ -380,6 +382,7 @@ class EditDeadlineModalForm(NewDeadlineModalForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.deadline = kwargs.pop("deadline", None)
|
||||
super().__init__(*args, **kwargs)
|
||||
self.form_title = _("Edit deadline")
|
||||
form_data = {
|
||||
"type": self.deadline.type,
|
||||
"date": str(self.deadline.date),
|
||||
@@ -497,6 +500,7 @@ class EditCompensationActionModalForm(NewActionModalForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.action = kwargs.pop("action", None)
|
||||
super().__init__(*args, **kwargs)
|
||||
self.form_title = _("Edit action")
|
||||
form_data = {
|
||||
"action_type": list(self.action.action_type.values_list("id", flat=True)),
|
||||
"action_type_details": self.action.action_type_details.all(),
|
||||
|
||||
Reference in New Issue
Block a user