[A-Za-z0-9._+-]+)/edit/makelastcall/$', views_ballot.make_last_call, name='doc_make_last_call'),
diff --git a/ietf/doc/views_ballot.py b/ietf/doc/views_ballot.py
index 1a0c4a5cc..8053212e4 100644
--- a/ietf/doc/views_ballot.py
+++ b/ietf/doc/views_ballot.py
@@ -19,7 +19,8 @@ from ietf.doc.utils import ( add_state_change_event, close_ballot, close_open_ba
create_ballot_if_not_open, update_telechat )
from ietf.doc.mails import ( email_ballot_deferred, email_ballot_undeferred,
extra_automation_headers, generate_last_call_announcement,
- generate_issue_ballot_mail, generate_ballot_writeup, generate_approval_mail )
+ generate_issue_ballot_mail, generate_ballot_writeup, generate_ballot_rfceditornote,
+ generate_approval_mail )
from ietf.doc.lastcall import request_last_call
from ietf.iesg.models import TelechatDate
from ietf.ietfauth.utils import has_role, role_required
@@ -585,6 +586,57 @@ def ballot_writeupnotes(request, name):
),
context_instance=RequestContext(request))
+class BallotRfcEditorNoteForm(forms.Form):
+ rfc_editor_note = forms.CharField(widget=forms.Textarea, label="RFC Editor Note", required=True)
+
+ def clean_rfc_editor_note(self):
+ return self.cleaned_data["rfc_editor_note"].replace("\r", "")
+
+@role_required('Area Director','Secretariat')
+def ballot_rfceditornote(request, name):
+ """Editing of RFC Editor Note in the ballot"""
+ doc = get_object_or_404(Document, docalias__name=name)
+
+ login = request.user.person
+
+
+
+ existing = doc.latest_event(WriteupDocEvent, type="changed_rfc_editor_note_text")
+ if not existing or (existing.text == ""):
+ existing = generate_ballot_rfceditornote(request, doc)
+
+ form = BallotRfcEditorNoteForm(auto_id=False, initial=dict(rfc_editor_note=existing.text))
+
+ if request.method == 'POST' and "save_ballot_rfceditornote" in request.POST:
+ form = BallotRfcEditorNoteForm(request.POST)
+ if form.is_valid():
+ t = form.cleaned_data["rfc_editor_note"]
+ if t != existing.text:
+ e = WriteupDocEvent(doc=doc, by=login)
+ e.by = login
+ e.type = "changed_rfc_editor_note_text"
+ e.desc = "RFC Editor Note was changed"
+ e.text = t.rstrip()
+ e.save()
+
+ if request.method == 'POST' and "clear_ballot_rfceditornote" in request.POST:
+ e = WriteupDocEvent(doc=doc, by=login)
+ e.by = login
+ e.type = "changed_rfc_editor_note_text"
+ e.desc = "RFC Editor Note was cleared"
+ e.text = ""
+ e.save()
+
+ # make sure form shows a blank RFC Editor Note
+ form = BallotRfcEditorNoteForm(initial=dict(rfc_editor_note=" "))
+
+ return render_to_response('doc/ballot/rfceditornote.html',
+ dict(doc=doc,
+ back_url=doc.get_absolute_url(),
+ ballot_rfceditornote_form=form,
+ ),
+ context_instance=RequestContext(request))
+
class ApprovalTextForm(forms.Form):
approval_text = forms.CharField(widget=forms.Textarea, required=True)
@@ -657,7 +709,19 @@ def approve_ballot(request, name):
if not e:
e = generate_ballot_writeup(request, doc)
ballot_writeup = e.text
-
+
+ error_duplicate_rfc_editor_note = False
+ e = doc.latest_event(WriteupDocEvent, type="changed_rfc_editor_note_text")
+ if e and (e.text != ""):
+ if "RFC Editor Note" in ballot_writeup:
+ error_duplicate_rfc_editor_note = True
+ ballot_writeup += "\n\n" + e.text
+
+ if error_duplicate_rfc_editor_note:
+ return render_to_response('doc/draft/rfceditor_note_duplicate_error.html',
+ dict(doc=doc),
+ context_instance=RequestContext(request))
+
if "NOT be published" in approval_text:
action = "do_not_publish"
elif "To: RFC Editor" in approval_text:
diff --git a/ietf/doc/views_doc.py b/ietf/doc/views_doc.py
index 3682877dc..f095b47d5 100644
--- a/ietf/doc/views_doc.py
+++ b/ietf/doc/views_doc.py
@@ -691,6 +691,10 @@ def document_writeup(request, name):
text_from_writeup("changed_ballot_writeup_text"),
urlreverse("doc_ballot_writeupnotes", kwargs=dict(name=doc.name))))
+ writeups.append(("RFC Editor Note",
+ text_from_writeup("changed_rfc_editor_note_text"),
+ urlreverse("doc_ballot_rfceditornote", kwargs=dict(name=doc.name))))
+
elif doc.type_id == "charter":
sections.append(("WG Review Announcement",
"",
diff --git a/ietf/iesg/views.py b/ietf/iesg/views.py
index 6fbd07cc2..77d5dbd7f 100644
--- a/ietf/iesg/views.py
+++ b/ietf/iesg/views.py
@@ -156,6 +156,9 @@ def agenda_json(request, date=None):
e = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
if e:
docinfo['consensus'] = e.consensus
+
+ docinfo['rfc-ed-note'] = doc.has_rfc_editor_note()
+
elif doc.type_id == 'conflrev':
docinfo['rev'] = doc.rev
td = doc.relateddocument_set.get(relationship__slug='conflrev').target.document
diff --git a/ietf/secr/telechat/views.py b/ietf/secr/telechat/views.py
index e32199a8e..ea171c5b1 100644
--- a/ietf/secr/telechat/views.py
+++ b/ietf/secr/telechat/views.py
@@ -57,7 +57,14 @@ def get_doc_writeup(doc):
want to display the contents of the document
'''
writeup = 'This document has no writeup'
- if doc.type_id in ('draft','charter'):
+ if doc.type_id == 'draft':
+ latest = doc.latest_event(WriteupDocEvent, type='changed_ballot_writeup_text')
+ if latest and doc.has_rfc_editor_note:
+ rfced_note = doc.latest_event(WriteupDocEvent, type="changed_rfc_editor_note_text")
+ writeup = latest.text + "\n\n" + rfced_note.text
+ else:
+ writeup = latest.text
+ if doc.type_id == 'charter':
latest = doc.latest_event(WriteupDocEvent, type='changed_ballot_writeup_text')
if latest:
writeup = latest.text
diff --git a/ietf/templates/doc/ballot/writeupnotes.html b/ietf/templates/doc/ballot/writeupnotes.html
index 558843969..390c46898 100644
--- a/ietf/templates/doc/ballot/writeupnotes.html
+++ b/ietf/templates/doc/ballot/writeupnotes.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-{# Copyright The IETF Trust 2015, All Rights Reserved #}
+{# Copyright The IETF Trust 2016, All Rights Reserved #}
{% load origin %}
{% load bootstrap3 %}
@@ -18,7 +18,7 @@
{% bootstrap_form ballot_writeup_form %}
- Technical summary, Working Group summary, document quality, personnel, RFC Editor note, IRTF note, IESG note, IANA note. This text will be appended to all announcements and messages to the IRTF or RFC Editor.
+ Technical summary, Working Group summary, document quality, personnel, IRTF note, IESG note, IANA note. This text will be appended to all announcements and messages to the IRTF or RFC Editor.
{% buttons %}
diff --git a/ietf/templates/doc/mail/ballot_writeup.txt b/ietf/templates/doc/mail/ballot_writeup.txt
index 02888c631..b8b81e100 100644
--- a/ietf/templates/doc/mail/ballot_writeup.txt
+++ b/ietf/templates/doc/mail/ballot_writeup.txt
@@ -32,10 +32,6 @@ Personnel
experts(s), insert 'The IANA Expert(s) for the registries
in this document are .'
-RFC Editor Note
-
- (Insert RFC Editor Note here or remove section)
-
IRTF Note
(Insert IRTF Note here or remove section)
diff --git a/ietf/templates/iesg/agenda_doc.html b/ietf/templates/iesg/agenda_doc.html
index fbfa5c6a0..31f5c18ab 100644
--- a/ietf/templates/iesg/agenda_doc.html
+++ b/ietf/templates/iesg/agenda_doc.html
@@ -1,4 +1,4 @@
-{# Copyright The IETF Trust 2015, All Rights Reserved #}{% load origin %}{% origin %}
+{# Copyright The IETF Trust 2016, All Rights Reserved #}{% load origin %}{% origin %}
{% load ietf_filters ballot_icon %}
{% ballot_icon doc %}
@@ -20,6 +20,9 @@
{% endwith %}
{{ doc.canonical_name }}
+ {% if doc.has_rfc_editor_note %}
+ (Has RFC Editor Note)
+ {% endif %}
{{ doc.intended_std_level }}{{ doc.title }}
diff --git a/ietf/templates/iesg/agenda_doc.txt b/ietf/templates/iesg/agenda_doc.txt
index 2bff27169..655736628 100644
--- a/ietf/templates/iesg/agenda_doc.txt
+++ b/ietf/templates/iesg/agenda_doc.txt
@@ -1,5 +1,5 @@
{% load ietf_filters %}{% with doc.rfc_number as rfc_number %}
- o {{doc.canonical_name}}{% if not rfc_number %}-{{doc.rev}}{% endif %}{% endwith %}{% if doc.stream %} - {{ doc.stream }} stream{% endif %}
+ o {{doc.canonical_name}}{% if not rfc_number %}-{{doc.rev}}{% endif %}{% endwith %}{%if doc.has_rfc_editor_note %} (Has RFC Editor Note){% endif %}{% if doc.stream %} - {{ doc.stream }} stream{% endif %}
{% filter wordwrap:"68"|indent|indent %}{{ doc.title }} ({{ doc.intended_std_level }}){% endfilter %}
{% if doc.note %}{# note: note is not escaped #} {% filter wordwrap:"68"|indent|indent %}Note: {{ doc.note|striptags }}{% endfilter %}
{% endif %} Token: {{ doc.ad }}{% if doc.iana_review_state %}