Integrate old patch for warning on the request for publication page if

intended std level and consensus is not filled in for the draft before
sending it (as per discussion with Alice Russo) - the consensus check
is skipped for ISE drafts
 - Legacy-Id: 7103
This commit is contained in:
Ole Laursen 2014-01-10 17:16:12 +00:00
parent 1dd422e013
commit b4dfae121b
2 changed files with 16 additions and 4 deletions

View file

@ -1178,6 +1178,8 @@ def request_publication(request, name):
if not is_authorized_in_doc_stream(request.user, doc):
return HttpResponseForbidden("You do not have the necessary permissions to view this page")
consensus_event = doc.latest_event(ConsensusDocEvent, type="changed_consensus")
m = Message()
m.frm = request.user.person.formatted_email()
m.to = "RFC Editor <rfc-editor@rfc-editor.org>"
@ -1247,6 +1249,7 @@ def request_publication(request, name):
doc=doc,
message=m,
next_state=next_state,
consensus_filled_in=consensus_event != None,
),
context_instance = RequestContext(request))

View file

@ -3,9 +3,9 @@
{% block title %}Request publication for {{ doc }}{% endblock %}
{% block morecss %}
p.warning { color: #a00; font-weight: bold; }
form.request-publication #id_subject,
form.request-publication #id_body { width: 50em; }
form.request-publication #id_body { height: 30em; }
{% endblock %}
@ -15,6 +15,15 @@ form.request-publication #id_body { height: 30em; }
<p>Send a publication request to the RFC Editor for {{ doc }} and move
it to the <em>{{ next_state.name }}</em> stream state.</p>
{% if not doc.intended_std_level %}
<p class="warning">Note: Intended RFC status is not set for the document.</p>
{% endif %}
{% if doc.stream_id != "ise" and not consensus_filled_in %}
<p class="warning">Note: Consensus status is not set for the document.</p>
{% endif %}
<p>Please edit the message and remove any parts in brackets you do not
fill in. For independent submissions, see the <a
href="http://www.rfc-editor.org/indsubs.html">guidelines</a>.</p>
@ -27,9 +36,9 @@ href="http://www.rfc-editor.org/indsubs.html">guidelines</a>.</p>
<tr><td style="vertical-align: top">Message:</td> <td>{{ form.body }} {{ form.body.errors }}</td></tr>
<tr class="actions"><td></td>
<td>
<a href="{% url "doc_view" name=doc.name %}">Back</a>
<input name="reset" type="submit" value="Reset"/>
<input type="submit" value="Send request to the RFC Editor"/>
<a class="button" href="{% url "doc_view" name=doc.name %}">Cancel</a>
<input class="button" name="reset" type="submit" value="Reset"/>
<input class="button" type="submit" value="Send request to the RFC Editor"/>
</td>
</tr>
</table>