diff options
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/templates/ishtar/wizard/wizard_delete_associated_to_admin_act.html | 2 | ||||
-rw-r--r-- | ishtar_common/wizards.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ishtar_common/templates/ishtar/wizard/wizard_delete_associated_to_admin_act.html b/ishtar_common/templates/ishtar/wizard/wizard_delete_associated_to_admin_act.html index c1284b94d..2fc84674b 100644 --- a/ishtar_common/templates/ishtar/wizard/wizard_delete_associated_to_admin_act.html +++ b/ishtar_common/templates/ishtar/wizard/wizard_delete_associated_to_admin_act.html @@ -1,5 +1,5 @@ {% extends "ishtar/wizard/delete_wizard.html" %} {% load i18n %} {% block "extra_warning" %} -<p><strong>{% trans "If any, all administrative act listed above will be deleted." %}</strong></p> +<p><strong>{% trans "If any, all related items listed above will be deleted." %}</strong></p> {% endblock %} diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 9801e596f..c4691c4f2 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1867,6 +1867,7 @@ class MultipleDeletionWizard(MultipleItemWizard): res[field.name] = (label, value, "") full_res.append(res) datas = [] + deleted_data = {} for idx, res in enumerate(full_res): data = [] for field in self.fields: @@ -1874,6 +1875,13 @@ class MultipleDeletionWizard(MultipleItemWizard): data.append(res[field]) obj = self.current_objs[idx] datas.append((f"{obj.class_verbose_name() if hasattr(obj, 'class_verbose_name') else ''} - {obj}", data)) + if hasattr(obj, "get_deleted_data"): + for key, value in obj.get_deleted_data().items(): + if key not in deleted_data: + deleted_data[key] = [] + deleted_data[key] += [(v, "", "") for v in value] + for key, value in deleted_data.items(): + datas.append((key, value)) return datas def get_context_data(self, form, **kwargs): |