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
commit5a12bcce1cfad8fcf93f902bc9e4c82c4a53ee14 (patch)
tree3077178cc426d37b558913dda1240974ba99e36f /ishtar_common/wizards.py
parent0b5e08da0814e9cf65e3b9410d330be79a87a3db (diff)
downloadIshtar-5a12bcce1cfad8fcf93f902bc9e4c82c4a53ee14.tar.bz2
Ishtar-5a12bcce1cfad8fcf93f902bc9e4c82c4a53ee14.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,