Skip to content

Commit 3942d63

Browse files
committed
Recover confirmation url and fix draft_status template. Fixes ietf-tools#591
- Legacy-Id: 2847
1 parent 04c4043 commit 3942d63

3 files changed

Lines changed: 46 additions & 29 deletions

File tree

ietf/submit/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
url(r'^status/$', 'submit_status', name='submit_status'),
77
url(r'^status/(?P<submission_id>\d+)/$', 'draft_status', name='draft_status'),
88
url(r'^status/(?P<submission_id>\d+)/edit/$', 'draft_edit', name='draft_edit'),
9+
url(r'^status/(?P<submission_id>\d+)/confirm/(?P<auth_key>[a-f\d]+)/$', 'draft_confirm', name='draft_confirm'),
910
url(r'^status/(?P<submission_id>\d+)/cancel/$', 'draft_cancel', name='draft_cancel'),
1011
)
1112

ietf/submit/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def draft_status(request, submission_id, message=None):
4949
status = None
5050
allow_edit = True
5151
if detail.status_id != UPLOADED:
52+
if detail.status_id == CANCELED:
53+
message=('error', 'This submission has been canceled, modification is no longer possible')
5254
status = detail.status
5355
allow_edit = None
5456
if request.method=='POST' and allow_edit:
@@ -67,7 +69,9 @@ def draft_status(request, submission_id, message=None):
6769
'validation': validation,
6870
'auto_post_form': auto_post_form,
6971
'is_valid': is_valid,
70-
'canceled': detail.status_id == CANCELED
72+
'status': status,
73+
'message': message,
74+
'allow_edit': allow_edit,
7175
},
7276
context_instance=RequestContext(request))
7377

ietf/templates/submit/draft_status.html

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@
6868

6969
{% block submit_content %}
7070

71-
{% if canceled %}
72-
<h2>Submission Canceled</h2>
73-
<div class="metadata-errors">
74-
<p>This submission has been canceled, modification is no longer possible.</p>
75-
</div>
71+
{% if status %}
72+
<h2>Status of the submission: {{ status.status_value }}</h2>
73+
{% endif %}
74+
75+
{% if message %}
76+
<div class="info-message-{{ message.0 }}">{{ message.1 }}</div>
7677
{% endif %}
7778

7879
<h2>Check Page</h2>
@@ -143,29 +144,40 @@ <h3>Meta-Data errors found</h3>
143144
<tr{% if validation.warnings.pages %} class="warning"{% endif %}><th>Pages</th><td>{{ detail.txt_page_count }}<div class="warn_message">{{ validation.warnings.pages }}</div></td></tr>
144145
<tr{% if validation.warnings.abstract %} class="warning"{% endif %}><th>Abstract</th><td>{{ detail.abstract|linebreaksbr }}<div class="warn_message">{{ validation.warnings.abstract }}</div></td></tr>
145146
</table>
146-
{% if not canceled %}
147-
<form method="post" action="" name="auto_post_form">
148-
<input type="submit" value="Adjust Meta-Data" value="adjust" /> (Leads to manual post by the Secretariat)
149-
</form>
150-
{% if is_valid %}
151-
<h2>Please edit the following meta-data before proceeding to Auto-Post</h2>
152-
<p>
153-
If you are one of the authors of this document, then please click the button with your name on it to automatically fill in the submitter information as requested below. Otherwise, please manually enter your information.
154-
</p>
155-
<form method="post" action="">
156-
{{ auto_post_form.get_author_buttons|safe }}
157-
<table class="metadata-table">
158-
{{ auto_post_form }}
159-
</table>
160-
<input type="submit" value="Post" name="autopost" />
161-
</form>
162-
{% endif %}
163-
164-
<h2>Cancel submission</h2>
165-
<p>
166-
<input type="button" onclick="confirmCancelation();" value="Cancel Submission" /><br>
167-
This submission will be canceled, and its uploaded document(s) permanently deleted.
168-
</p>
147+
148+
{% if allow_edit %}
149+
<form method="post" action="" name="auto_post_form">
150+
<input type="submit" value="Adjust Meta-Data" value="adjust" /> (Leads to manual post by the Secretariat)
151+
</form>
152+
{% if is_valid %}
153+
<h2>Please edit the following meta-data before proceeding to Auto-Post</h2>
154+
<p>
155+
If you are one of the authors of this document, then please click the button with your name on it to automatically fill in the submitter information as requested below. Otherwise, please manually enter your information.
156+
</p>
157+
<form method="post" action="">
158+
{{ auto_post_form.get_author_buttons|safe }}
159+
<table class="metadata-table">
160+
{{ auto_post_form }}
161+
</table>
162+
<input type="submit" value="Post" name="autopost" />
163+
</form>
164+
{% endif %}
165+
166+
<h2>Cancel submission</h2>
167+
<p>
168+
<input type="button" onclick="confirmCancelation();" value="Cancel Submission" /><br>
169+
This submission will be canceled, and its uploaded document(s) permanently deleted.
170+
</p>
171+
{% else %}
172+
{% if validation.submitter %}
173+
<h3>Submitter information</h3>
174+
<table class="metadata-table">
175+
<tr><th>First name</th><td>{{ validation.submitter.first_name }}</td></tr>
176+
<tr><th>Last name</th><td>{{ validation.submitter.last_name }}</td></tr>
177+
<tr><th>Email address</th><td>{{ validation.submitter.email_address|default:validation.submitter.email.1 }}</td></tr>
178+
</table>
179+
{% endif %}
180+
169181
{% endif %}
170182

171183
<p>

0 commit comments

Comments
 (0)