Skip to content

Commit fe46690

Browse files
committed
Insert a button to perform the last step of autopost via POST request. Fixes ietf-tools#650
- Legacy-Id: 3064
1 parent af039fb commit fe46690

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

ietf/submit/views.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,13 @@ def draft_confirm(request, submission_id, auth_key):
214214
elif detail.status_id != WAITING_AUTHENTICATION:
215215
message = ('error', 'The submission can not be autoposted because it is in state: %s' % detail.status.status_value)
216216
else:
217-
message = ('success', 'Authorization key accepted. Auto-Post complete')
218-
perform_post(detail)
217+
if request.method=='POST':
218+
message = ('success', 'Authorization key accepted. Auto-Post complete')
219+
perform_post(detail)
220+
else:
221+
return render_to_response('submit/last_confirmation_step.html',
222+
{'detail': detail, },
223+
context_instance=RequestContext(request))
219224
return draft_status(request, submission_id, message=message)
220225

221226

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends "submit/submit_base.html" %}
2+
3+
{% block title %}Confirm Auto-Post{% endblock %}
4+
5+
6+
{% block submit_content %}
7+
8+
<h2>Confirm auto-post</h2>
9+
<p>
10+
Authorization key accepted. Please the button below to finish Auto-Post of <strong>{{ detail.filename }}-{{ detail.revision }}</strong>
11+
</p>
12+
<form action="" method="post">
13+
<input type="submit" value="Auto-Post" />
14+
</form>
15+
{% endblock %}

0 commit comments

Comments
 (0)