summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-02-12 23:34:01 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-05-06 15:48:16 +0200
commit96b8337aa18ec199c925883dfb5d85bc310270b6 (patch)
tree3077178cc426d37b558913dda1240974ba99e36f /ishtar_common/wizards.py
parent63f117d7585f999d7f6c0667c47bfdc3ec8db3af (diff)
downloadIshtar-96b8337aa18ec199c925883dfb5d85bc310270b6.tar.bz2
Ishtar-96b8337aa18ec199c925883dfb5d85bc310270b6.zip
Add a new reset wizard action available from main templates (refs #2282)
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 2ad3635d7..1e515d13e 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -620,6 +620,13 @@ class Wizard(NamedUrlWizardView):
return key in request.session[storage.prefix]['step_data'][form_key]
@classmethod
+ def session_reset(cls, request, url_name):
+ prefix = url_name + normalize_name(cls.__name__)
+ storage = get_storage(cls.storage_name, prefix, request,
+ getattr(cls, 'file_storage', None))
+ storage.reset()
+
+ @classmethod
def session_set_value(cls, request, form_key, key, value, reset=False):
prefix = form_key.split('-')[1] + normalize_name(cls.__name__)
storage = get_storage(cls.storage_name, prefix, request,