From 3942d63733e6df55f0f5b2b78c27056f9af18c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20A=2E=20S=C3=A1nchez=20L=C3=B3pez?= Date: Thu, 10 Feb 2011 20:01:49 +0000 Subject: [PATCH] Recover confirmation url and fix draft_status template. Fixes #591 - Legacy-Id: 2847 --- ietf/submit/urls.py | 1 + ietf/submit/views.py | 6 ++- ietf/templates/submit/draft_status.html | 68 +++++++++++++++---------- 3 files changed, 46 insertions(+), 29 deletions(-) diff --git a/ietf/submit/urls.py b/ietf/submit/urls.py index b7de99106..a149ebb2e 100644 --- a/ietf/submit/urls.py +++ b/ietf/submit/urls.py @@ -6,6 +6,7 @@ urlpatterns = patterns('ietf.submit.views', url(r'^status/$', 'submit_status', name='submit_status'), url(r'^status/(?P\d+)/$', 'draft_status', name='draft_status'), url(r'^status/(?P\d+)/edit/$', 'draft_edit', name='draft_edit'), + url(r'^status/(?P\d+)/confirm/(?P[a-f\d]+)/$', 'draft_confirm', name='draft_confirm'), url(r'^status/(?P\d+)/cancel/$', 'draft_cancel', name='draft_cancel'), ) diff --git a/ietf/submit/views.py b/ietf/submit/views.py index 3e534a67b..f13ea3c35 100644 --- a/ietf/submit/views.py +++ b/ietf/submit/views.py @@ -49,6 +49,8 @@ def draft_status(request, submission_id, message=None): status = None allow_edit = True if detail.status_id != UPLOADED: + if detail.status_id == CANCELED: + message=('error', 'This submission has been canceled, modification is no longer possible') status = detail.status allow_edit = None if request.method=='POST' and allow_edit: @@ -67,7 +69,9 @@ def draft_status(request, submission_id, message=None): 'validation': validation, 'auto_post_form': auto_post_form, 'is_valid': is_valid, - 'canceled': detail.status_id == CANCELED + 'status': status, + 'message': message, + 'allow_edit': allow_edit, }, context_instance=RequestContext(request)) diff --git a/ietf/templates/submit/draft_status.html b/ietf/templates/submit/draft_status.html index fc8c3018f..68cfc78dd 100644 --- a/ietf/templates/submit/draft_status.html +++ b/ietf/templates/submit/draft_status.html @@ -68,11 +68,12 @@ function confirmCancelation(){ {% block submit_content %} -{% if canceled %} -

Submission Canceled

- +{% if status %} +

Status of the submission: {{ status.status_value }}

+{% endif %} + +{% if message %} +
{{ message.1 }}
{% endif %}

Check Page

@@ -143,29 +144,40 @@ returned to the submitter. Pages{{ detail.txt_page_count }}
{{ validation.warnings.pages }}
Abstract{{ detail.abstract|linebreaksbr }}
{{ validation.warnings.abstract }}
-{% if not canceled %} -
- (Leads to manual post by the Secretariat) -
- {% if is_valid %} -

Please edit the following meta-data before proceeding to Auto-Post

-

- 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. -

-
- {{ auto_post_form.get_author_buttons|safe }} - - {{ auto_post_form }} - - -
- {% endif %} - -

Cancel submission

-

-
- This submission will be canceled, and its uploaded document(s) permanently deleted. -

+ +{% if allow_edit %} +
+ (Leads to manual post by the Secretariat) +
+{% if is_valid %} +

Please edit the following meta-data before proceeding to Auto-Post

+

+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. +

+
+{{ auto_post_form.get_author_buttons|safe }} + +{{ auto_post_form }} + + +
+{% endif %} + +

Cancel submission

+

+
+ This submission will be canceled, and its uploaded document(s) permanently deleted. +

+{% else %} +{% if validation.submitter %} +

Submitter information

+ + + + + +{% endif %} + {% endif %}