diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-14 09:03:56 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-09-14 09:03:56 +0200 |
commit | 73ba1638f580f6968126f4939a1f4495710915cb (patch) | |
tree | bf7480e89c9d0dea0932faf346762e3db7e5b7f9 /ishtar_common/wizards.py | |
parent | 63ffae36db57b1f2a0df50e43c04a0676df79bc9 (diff) | |
download | Ishtar-73ba1638f580f6968126f4939a1f4495710915cb.tar.bz2 Ishtar-73ba1638f580f6968126f4939a1f4495710915cb.zip |
Context records: multiple deletion - redirections after wizard changes
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 9c89fd04b..0c13139df 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -1527,7 +1527,7 @@ class DeletionWizard(Wizard): (hasattr(self, 'model') and hasattr(self.model, 'TABLE_COLS')): self.fields = self.model.TABLE_COLS assert self.model - return super(DeletionWizard, self).__init__(*args, **kwargs) + super(DeletionWizard, self).__init__(*args, **kwargs) def get_formated_datas(self, forms): datas = super(DeletionWizard, self).get_formated_datas(forms) @@ -1604,7 +1604,14 @@ class MultipleDeletionWizard(MultipleItemWizard): (hasattr(self, 'model') and hasattr(self.model, 'TABLE_COLS')): self.fields = self.model.TABLE_COLS assert self.model - return super(MultipleDeletionWizard, self).__init__(*args, **kwargs) + super(MultipleDeletionWizard, self).__init__(*args, **kwargs) + + def get_template_names(self): + current_step = self.steps.current + if current_step.startswith("final-") and \ + current_step not in self.wizard_templates: + return ["ishtar/wizard/delete_wizard.html"] + return super(MultipleDeletionWizard, self).get_template_names() def get_formated_datas(self, forms): datas = super(MultipleDeletionWizard, self).get_formated_datas(forms) |