summaryrefslogtreecommitdiffstats
path: root/src/workflow/views.py
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2019-05-22 10:13:03 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2019-05-22 13:34:13 -0400
commita21c6044461097a8551efd7bbcae2cd4d466fb07 (patch)
treee4150db2439f12a2fe8f06a1ea499327235af46d /src/workflow/views.py
parent2fd2b83361813e0a8375d81729c86adcb2c6feda (diff)
Make steps possible to hide/show
Change-Id: Ice5036ea9801655032cb080537fbd471fb3fda3e Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/workflow/views.py')
-rw-r--r--src/workflow/views.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/workflow/views.py b/src/workflow/views.py
index 6d59b1c..f2e37ef 100644
--- a/src/workflow/views.py
+++ b/src/workflow/views.py
@@ -54,7 +54,12 @@ def step_view(request):
# no manager found, redirect to "lost" page
return no_workflow(request)
if request.GET.get('step') is not None:
- manager.goto(int(request.GET.get('step')))
+ if request.GET.get('step') == 'next':
+ manager.go_next()
+ elif request.GET.get('step') == 'prev':
+ manager.go_prev()
+ else:
+ raise Exception("requested action for new step had malformed contents: " + request.GET.get('step'))
return manager.render(request)