diff --git a/ietf/templates/wgcharter/change_state.html b/ietf/templates/wgcharter/change_state.html
index de1757661..ece85a6d9 100644
--- a/ietf/templates/wgcharter/change_state.html
+++ b/ietf/templates/wgcharter/change_state.html
@@ -48,6 +48,12 @@ form.change-state .actions {
{{ field.errors }}
+ {% if field.name == "charter_state" and not option == "initcharter" %}
+
+ |
+ |
+
+ {% endif %}
{% endfor %}
{% if initial_review %}
| Warning: Announced initial review time hasn't elapsed yet. It does so at {{ initial_review.expires }}. |
@@ -80,7 +86,8 @@ form.change-state .actions {
{% block content_end %}
{% endblock %}
diff --git a/ietf/wgcharter/views.py b/ietf/wgcharter/views.py
index d9854ad70..68743ae21 100644
--- a/ietf/wgcharter/views.py
+++ b/ietf/wgcharter/views.py
@@ -102,7 +102,10 @@ def change_state(request, name, option=None):
email_secretariat(request, wg, "state-%s" % charter_state.slug, message)
if charter_state.slug == "intrev":
- create_ballot_if_not_open(charter, login, "r-extrev")
+ if request.POST.get("ballot_wo_extern"):
+ create_ballot_if_not_open(charter, login, "r-wo-ext")
+ else:
+ create_ballot_if_not_open(charter, login, "r-extrev")
elif charter_state.slug == "iesgrev":
create_ballot_if_not_open(charter, login, "approve")
@@ -151,6 +154,8 @@ def change_state(request, name, option=None):
state_pk("extrev"): "The WG %s (%s) has been set to External review by %s. Please send out the external review announcement to the appropriate lists.\n\nSend the announcement to other SDOs: Yes\nAdditional recipients of the announcement: " % (wg.name, wg.acronym, login.plain_name()),
}
+ states_for_ballot_wo_extern = State.objects.filter(type="charter", slug="intrev").values_list("pk", flat=True)
+
return render_to_response('wgcharter/change_state.html',
dict(form=form,
doc=wg.charter,
@@ -159,7 +164,9 @@ def change_state(request, name, option=None):
prev_charter_state=prev_charter_state,
title=title,
initial_review=initial_review,
- messages=simplejson.dumps(messages)),
+ messages=simplejson.dumps(messages),
+ states_for_ballot_wo_extern=simplejson.dumps(list(states_for_ballot_wo_extern)),
+ ),
context_instance=RequestContext(request))
class TelechatForm(forms.Form):
diff --git a/static/js/charter-change-state.js b/static/js/charter-change-state.js
index c3c737ff6..bfa4196c7 100644
--- a/static/js/charter-change-state.js
+++ b/static/js/charter-change-state.js
@@ -1,11 +1,16 @@
jQuery(document).ready(function () {
- function setMessageDraft() {
+ function stateChanged() {
var v = $(this).val();
jQuery("#id_message").val(messages[v] || "");
+
+ if (jQuery.inArray(+v, statesForBallotWoExtern) != -1)
+ jQuery("tr.ballot-wo-extern").show();
+ else
+ jQuery("tr.ballot-wo-extern").hide();
}
- jQuery("#id_charter_state").click(setMessageDraft).change(setMessageDraft).keydown(setMessageDraft);
+ jQuery("#id_charter_state").click(stateChanged).change(stateChanged).keydown(stateChanged);
- if (jQuery("#id_message").val() == "")
- jQuery("#id_charter_state").click();
+ // trigger event
+ jQuery("#id_charter_state").click();
});