summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-17 10:29:00 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-17 10:29:00 +0100
commit4801745cf223ccbc0bc76e219069bbbe4071de56 (patch)
tree31872b0875eefc5ad18ab54c026542752498fec6
parent9406a2043afe25ebc08e65b9cc223dd999bc003f (diff)
downloadIshtar-4801745cf223ccbc0bc76e219069bbbe4071de56.tar.bz2
Ishtar-4801745cf223ccbc0bc76e219069bbbe4071de56.zip
Wizard container: display container sheet at the end of the process (refs #3428)
-rw-r--r--archaeological_operations/wizards.py2
-rw-r--r--archaeological_warehouse/wizards.py8
2 files changed, 8 insertions, 2 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index 94aafb87c..5410b37f8 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -43,7 +43,7 @@ class OperationWizard(Wizard):
object_parcel_type = 'operation'
parcel_step_key = 'parcels'
relations_step_key = 'relations'
- # step contening the current(s) town(s)
+ # step including the current(s) town(s)
town_step_keys = ['towns-', 'townsgeneral-']
town_input_id = 'town' # input id of the current(s) town(s)
multi_towns = False # true if current town are multi valued
diff --git a/archaeological_warehouse/wizards.py b/archaeological_warehouse/wizards.py
index 0adb06f75..42659ae23 100644
--- a/archaeological_warehouse/wizards.py
+++ b/archaeological_warehouse/wizards.py
@@ -77,6 +77,7 @@ class ContainerWizard(Wizard):
'ishtar/wizard/wizard_containerlocalisation.html',
}
ignore_init_steps = ['localisation']
+ wizard_done_window = reverse_lazy('show-container')
def get_form_kwargs(self, step=None):
kwargs = super(ContainerWizard, self).get_form_kwargs(step)
@@ -98,6 +99,7 @@ class ContainerWizard(Wizard):
Save the localisation
"""
super(ContainerWizard, self).done(form_list)
+ dct = {}
for idx, form in enumerate(form_list):
if not form.is_valid():
return self.render(form)
@@ -119,8 +121,12 @@ class ContainerWizard(Wizard):
)
localisation.reference = form.cleaned_data[div_name]
localisation.save()
+ dct = {'item': container}
+ self.current_object = container
+ # force evaluation of lazy urls
+ dct['wizard_done_window'] = unicode(self.wizard_done_window)
return render_to_response(
- self.wizard_done_template, {},
+ self.wizard_done_template, dct,
context_instance=RequestContext(self.request))