Insert a button to perform the last step of autopost via POST request. Fixes #650

- Legacy-Id: 3064
This commit is contained in:
Emilio A. Sánchez López 2011-04-26 14:54:16 +00:00
parent af039fba02
commit fe466900e1
2 changed files with 22 additions and 2 deletions

View file

@ -214,8 +214,13 @@ def draft_confirm(request, submission_id, auth_key):
elif detail.status_id != WAITING_AUTHENTICATION:
message = ('error', 'The submission can not be autoposted because it is in state: %s' % detail.status.status_value)
else:
message = ('success', 'Authorization key accepted. Auto-Post complete')
perform_post(detail)
if request.method=='POST':
message = ('success', 'Authorization key accepted. Auto-Post complete')
perform_post(detail)
else:
return render_to_response('submit/last_confirmation_step.html',
{'detail': detail, },
context_instance=RequestContext(request))
return draft_status(request, submission_id, message=message)

View file

@ -0,0 +1,15 @@
{% extends "submit/submit_base.html" %}
{% block title %}Confirm Auto-Post{% endblock %}
{% block submit_content %}
<h2>Confirm auto-post</h2>
<p>
Authorization key accepted. Please the button below to finish Auto-Post of <strong>{{ detail.filename }}-{{ detail.revision }}</strong>
</p>
<form action="" method="post">
<input type="submit" value="Auto-Post" />
</form>
{% endblock %}