# Remove view
* refactors remove view methods into classes * introduced AbstractRemoveView * disables final-delete actions from admin views * extends error warnings on RemoveEcoAccountModalForm * removes LoginRequiredMixin from AbstractPublicReportView to make it accessible for the public * updates translations
This commit is contained in:
@@ -45,6 +45,14 @@ class AbstractCompensationAdmin(BaseObjectAdmin):
|
||||
states = "\n".join(states)
|
||||
return states
|
||||
|
||||
def get_actions(self, request):
|
||||
DELETE_ACTION_IDENTIFIER = "delete_selected"
|
||||
actions = super().get_actions(request)
|
||||
|
||||
if DELETE_ACTION_IDENTIFIER in actions:
|
||||
del actions[DELETE_ACTION_IDENTIFIER]
|
||||
|
||||
return actions
|
||||
|
||||
class CompensationAdmin(AbstractCompensationAdmin):
|
||||
autocomplete_fields = [
|
||||
|
||||
Reference in New Issue
Block a user