Commit 04ec755d authored by Evert Prants's avatar Evert Prants

Bans - Add option to delete all submissions by offender

parent 4c2e0d0f
......@@ -27,7 +27,8 @@
{% csrf_token %}
<p>Banning user <b>{{ target.display_name }}</b></p>
{{ form }}
<input type="submit" value="Submit" />
<input type="submit" value="Ban" />
<input type="submit" name="delete" value="Ban and Delete all submissions" />
......@@ -140,7 +140,6 @@ def SubmissionModForm(req, abbr, submission):
# Handle POST
if req.method == 'POST':
if 'delete' in req.POST:
return HttpResponseRedirect('/show/%s/episode/%d/%d'%(abbr, episode.season.number, episode.episode))
......@@ -329,6 +328,10 @@ def BanFromShowForm(req, abbr):
# Add show to scope
# Delete all of the user's submissions for this show
if 'delete' in req.POST:
return HttpResponseRedirect('/show/%s'%(abbr))
ctx['error'] = 'Invalid fields!'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment