diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2013-04-17 00:30:50 +0000 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2013-04-17 00:30:50 +0000 | 
| commit | 62d3eae1706a6bde8b0437ef765cf31983a88540 (patch) | |
| tree | 4e52c3b43085c61590db9fcccd34d8eb234825e5 | |
| parent | 301bec7d1e26347c8a0b0f53a5b09f487ba9cfb5 (diff) | |
| parent | 7db1383ea51e71abda0eeb4e7bb38796cc17f8f4 (diff) | |
| download | Ishtar-62d3eae1706a6bde8b0437ef765cf31983a88540.tar.bz2 Ishtar-62d3eae1706a6bde8b0437ef765cf31983a88540.zip | |
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
| -rw-r--r-- | ishtar_common/wizards.py | 14 | 
1 files changed, 11 insertions, 3 deletions
| diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index df7eaaac1..5229880ef 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -125,7 +125,10 @@ class Wizard(NamedUrlWizardView):          storage = self.storage          # if modification: show the next steps          if self.modification: -            next_step = step +            next_step = self.steps.first +            current_step_passed = False +            # force rechecking of conditions +            self.get_form_list()              while next_step:                  # check if the form is initialized otherwise initialize it                  if not storage.get_step_data(next_step): @@ -141,8 +144,14 @@ class Wizard(NamedUrlWizardView):                              for key in v:                                  form_key = next_step + prefix + key                                  prefixed_values[form_key] = v[key] +                    if not prefixed_values: +                        # simulate a non empty data for form that might be +                        # valid when empty +                        prefixed_values['__non_empty_data'] = ''                      storage.set_step_data(next_step, prefixed_values) -                if step != next_step: # if not current step +                if step == next_step: +                    current_step_passed = True +                elif current_step_passed:                      next_steps.append(self.form_list[next_step])                  next_step = self.get_next_step(next_step)          context.update({'next_steps':next_steps}) @@ -584,7 +593,6 @@ class Wizard(NamedUrlWizardView):              model_name = self.form_list[step].associated_models['pk'                                                ].__name__.lower()              if step == current_step: -                #self.reset_wizard(request, storage)                  self.storage.reset()              val = model_name in request.session and request.session[model_name]              if val: | 
