EMA
* adds Ema model (basically Compensation inherited) * adds index view for EMAs * fixes drop-down link bug for menu 'More' in navbar * refactors some more forms to use process_request() * adds modified attribute to BaseResource for easy last_modified check * adds setting of modified attribute in all places where UserAction.EDITED is added to log * adds EMA_ACCOUNT_IDENTIFIER_LENGTH and EMA_ACCOUNT_IDENTIFIER_TEMPLATE to ema/settings.py * adds EmaAdmin to ema/admin.py * fixes wrong title in intervention detail view html for revocations * adds support for subtitle variable to BaseTable and generic_index.html * drops next_version attribute from models * adds/updates translations * adds default ordering for UserActionLogEntry * removes extra ordering in log modal rendering
This commit is contained in:
@@ -89,6 +89,8 @@ class NewPaymentForm(BaseModalForm):
|
||||
intervention=self.intervention,
|
||||
)
|
||||
self.intervention.log.add(edited_action)
|
||||
self.intervention.modified = edited_action
|
||||
self.intervention.save()
|
||||
return pay
|
||||
|
||||
|
||||
@@ -122,6 +124,8 @@ class NewStateModalForm(BaseModalForm):
|
||||
comment=_("Added state")
|
||||
)
|
||||
self.instance.log.add(user_action)
|
||||
self.instance.modified = user_action
|
||||
self.instance.save()
|
||||
|
||||
state = CompensationState.objects.create(
|
||||
biotope_type=self.cleaned_data["biotope_type"],
|
||||
@@ -244,6 +248,8 @@ class NewDeadlineModalForm(BaseModalForm):
|
||||
action=UserAction.EDITED,
|
||||
comment=_("Added deadline")
|
||||
)
|
||||
self.instance.modified = edited_action
|
||||
self.instance.save()
|
||||
self.instance.log.add(edited_action)
|
||||
self.instance.deadlines.add(deadline)
|
||||
return deadline
|
||||
@@ -314,6 +320,8 @@ class NewActionModalForm(BaseModalForm):
|
||||
action=UserAction.EDITED,
|
||||
comment=_("Added action"),
|
||||
)
|
||||
self.instance.modified = edited_action
|
||||
self.instance.save()
|
||||
self.instance.log.add(edited_action)
|
||||
self.instance.actions.add(comp_action)
|
||||
return comp_action
|
||||
|
||||
Reference in New Issue
Block a user