Skip to content

Commit

Permalink
Add button to admin Edit Class page that saves and redirects to Manag…
Browse files Browse the repository at this point in the history
…e Class page
  • Loading branch information
Anthony Lu committed Mar 29, 2012
1 parent 2c30b07 commit 392c174
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions esp/esp/program/modules/handlers/teacherclassregmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ def makeaclass_logic(self, request, tl, one, two, module, extra, prog, newclass
if request.POST.has_key('manage') and request.POST['manage'] == 'manage':
if request.POST['manage_submit'] == 'reload':
return HttpResponseRedirect(request.get_full_path()+'?manage=manage')
elif request.POST['manage_submit'] == 'manageclass':
return HttpResponseRedirect('/manage/%s/manageclass/%s' % (self.program.getUrlBase(), extra))
elif request.POST['manage_submit'] == 'dashboard':
return HttpResponseRedirect('/manage/%s/dashboard' % self.program.getUrlBase())
elif request.POST['manage_submit'] == 'main':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ <h1>{{ addoredit }}ing a {{ classtype }} for {{ program.niceName }}</h1>
{% if manage %}
<input type="hidden" name="manage" value="manage" />
<button class="button" type="submit" name="manage_submit" value="reload">Save, then reload this page</button><br />
<button class="button" type="submit" name="manage_submit" value="manageclass">Save, then load the Manage Class page</button><br />
<button class="button" type="submit" name="manage_submit" value="dashboard">Save, then load the {{ program.niceName }} dashboard</button><br />
<button class="button" type="submit" name="manage_submit" value="main">Save, then load the {{ program.niceName }} admin portal</button><br />
{% else %}
Expand Down

0 comments on commit 392c174

Please sign in to comment.