Skip to content

Commit e593d9d

Browse files
committed
Added a warning to the draft submission page about upcoming submission cut-offs. Added a value in settings.py for the number of days before the first cut-off to display the waring.
- Legacy-Id: 7233
1 parent 07e93b5 commit e593d9d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

ietf/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@
335335
FIRST_CUTOFF_DAYS = 19 # Days from meeting to cut off dates on submit
336336
SECOND_CUTOFF_DAYS = 12
337337
CUTOFF_HOUR = 00 # midnight UTC
338+
CUTOFF_WARNING_DAYS = 21 # Number of days before cutoff to start showing the cutoff date
339+
338340
SUBMISSION_START_DAYS = -90
339341
SUBMISSION_CUTOFF_DAYS = 33
340342
SUBMISSION_CORRECTION_DAYS = 52

ietf/submit/forms.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,16 @@ def __init__(self, request, *args, **kwargs):
4242
self.parsed_draft = None
4343

4444
def set_cutoff_warnings(self):
45+
from datetime import timedelta
4546
now = datetime.datetime.utcnow()
4647
first_cut_off = Meeting.get_first_cut_off()
4748
second_cut_off = Meeting.get_second_cut_off()
4849
ietf_monday = Meeting.get_ietf_monday()
4950

50-
if now.date() >= first_cut_off and now.date() < second_cut_off: # We are in the first_cut_off
51+
if now.date() >= (first_cut_off-timedelta(days=settings.CUTOFF_WARNING_DAYS)) and now.date() < first_cut_off:
52+
self.cutoff_warning = ( 'The pre-meeting cut-off date for new documents (i.e., version -00 Internet-Drafts) is %s at %02sh UTC.<br/>' % (first_cut_off, settings.CUTOFF_HOUR) +
53+
'The pre-meeting cut-off date for revisions to existing documents is %s at %02sh UTC.<br/>' % (second_cut_off, settings.CUTOFF_HOUR) )
54+
elif now.date() >= first_cut_off and now.date() < second_cut_off: # We are in the first_cut_off
5155
if now.date() == first_cut_off and now.hour < settings.CUTOFF_HOUR:
5256
self.cutoff_warning = 'The pre-meeting cut-off date for new documents (i.e., version -00 Internet-Drafts) is %s, at %02sh UTC. After that, you will not be able to submit a new document until %s, at %sh UTC' % (first_cut_off, settings.CUTOFF_HOUR, ietf_monday, settings.CUTOFF_HOUR, )
5357
else: # No 00 version allowed

0 commit comments

Comments
 (0)