1) Restructured the position editing page to better integrate the defer button.

2) Copied the jquery-1.5.1.min.js library into /static/js/lib (from /static/js)
   because that's where the main document template was looking for it. There have
   probably been several problems since the change that left this dangling that
   showed up as things not behaving, but not as errors. The one that clued me in
   was the discuss text-box not being hidden when the position wasn't DISCUSS.
   They should all behave better now.

3) Added a django form validator to the discuss text field to not allow actions
   when the position is Discuss, but the discuss-text is empty.

4) Added logic to the undefer fuction to put the document back on the previous
   telechat (if that hasn't already passed). That is, date1 from telechat dates,
   and not date2.

5) Changed the last_call_announcement generation function's template to include
   the abstracts from the document sets (which with modern usage means the abstract
   of the document) reflecting the IESGs decision of a few months back.
 - Legacy-Id: 3097
This commit is contained in:
Robert Sparks 2011-05-05 13:58:37 +00:00
parent 14edf23ac1
commit 024a74a562
6 changed files with 56 additions and 25 deletions

View file

@ -58,6 +58,13 @@ class EditPositionForm(forms.Form):
discuss_text = forms.CharField(required=False, widget=forms.Textarea)
comment_text = forms.CharField(required=False, widget=forms.Textarea)
return_to_url = forms.CharField(required=False, widget=forms.HiddenInput)
def clean_discuss_text(self):
entered_discuss = self.cleaned_data["discuss_text"]
entered_pos = self.cleaned_data["position"]
if entered_pos == "discuss" and not entered_discuss:
print "Raising discuss ",entered_pos," ",entered_discuss
raise forms.ValidationError("You must enter a non-empty discuss")
return entered_discuss
@group_required('Area_Director','Secretariat')
def edit_position(request, name):
@ -163,7 +170,13 @@ def edit_position(request, name):
qstr += "&ad=%s" % request.GET.get('ad')
return HttpResponseRedirect(urlreverse("doc_send_ballot_comment", kwargs=dict(name=doc.filename)) + qstr)
else:
return HttpResponseRedirect(return_to_url)
if request.POST.get("Defer"):
return HttpResponseRedirect(urlreverse("doc_defer_ballot", kwargs=dict(name=doc)))
else:
if request.POST.get("Undefer"):
return HttpResponseRedirect(urlreverse("doc_undefer_ballot", kwargs=dict(name=doc)))
else:
return HttpResponseRedirect(return_to_url)
else:
initial = {}
if pos:
@ -306,12 +319,14 @@ def undefer_ballot(request, name):
raise Http404()
login = IESGLogin.objects.get(login_name=request.user.username)
telechat_date = TelechatDates.objects.all()[0].date1
if request.method == 'POST':
doc.idinternal.ballot.defer = False
doc.idinternal.ballot.save()
doc.idinternal.change_state(IDState.objects.get(document_state_id=IDState.IESG_EVALUATION), None)
doc.idinternal.telechat_date = telechat_date
doc.idinternal.event_date = date.today()
doc.idinternal.save()
@ -320,7 +335,7 @@ def undefer_ballot(request, name):
return HttpResponseRedirect(doc.idinternal.get_absolute_url())
return render_to_response('idrfc/undefer_ballot.html',
dict(doc=doc),
dict(doc=doc,telechat_date=telechat_date),
context_instance=RequestContext(request))
class LastCallTextForm(forms.ModelForm):

View file

@ -65,16 +65,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% endif %}
{% endifequal %}
{# links to old system #}
<span id="doc_edit_button" class="yui-button yui-link-button" style="margin-left:2px;"><span class="first-child">
{% if doc.in_ietf_process %}
<a href="https://datatracker.ietf.org/cgi-bin/idtracker.cgi?command=view_id&amp;{% if info.is_rfc %}dTag={{doc.rfc_number}}&amp;rfc_flag=1{% else %}dTag={{doc.tracker_id}}{% endif %}" rel="nofollow" target="_blank">Edit (old IESG Tracker)</a>
{% else %}
<a href="https://datatracker.ietf.org/cgi-bin/idtracker.cgi?command=add_id_confirm&amp;{% if info.is_rfc %}dTag={{doc.rfc_number}}&amp;rfc_flag=1{% else %}dTag={{doc.tracker_id}}&amp;rfc_flag=0{% endif %}&amp;ballot_id=0" rel="nofollow" target="_blank">Add (old IESG Tracker)</a>
{% endif %}
</span></span>
{# end links to old #}
</div>
{% endif %}{# if user in group #}
{% endblock doc_metabuttons%}

View file

@ -31,26 +31,29 @@ form.position-form .comment-text {
{% block content %}
<h1>Change position for {{ ad }} on {{ doc }}</h1>
{% if ballot.was_deferred %}
<div style="margin-top:8px; margin-bottom:8px;">Ballot deferred by {{ ballot.deferred_by }} on {{ ballot.deferred_date }}.</div>
{% endif %}
<form class="position-form" action="" method="POST">
<div>
<div class="position">{{ form.position }}</div>
{% if ballot.was_deferred %}
<div style="margin-top:8px; margin-bottom:8px;"><span id="doc_undefer_ballot_button" class="yui-button yui-link-button"><span class="first-child"><a href="{% url doc_undefer_ballot name=doc %}">Undefer ballot</a></span></span></div>
<div style="margin-top:8px; margin-bottom:8px;">Ballot deferred by {{ ballot.deferred_by }} on {{ ballot.deferred_date }}.</div>
{% else %}
<div style="margin-top:8px; margin-bottom:8px;"><span id="doc_defer_ballot_button" class="yui-button yui-link-button"><span class="first-child"><a href="{% url doc_defer_ballot name=doc %}">Defer ballot</a></span></span></div>
{% endif %}
<span class="position">{{ form.position }}</span>
<span class="actions">
<input type="submit" name="send_mail" value="Save and send email"/>
<input type="submit" value="Save"/>
{% if ballot.was_deferred %}<input type="submit" name="Undefer" value="Undefer"/>{% else %}<input type="submit" name="Defer" value="Defer"/>{% endif %}
</span>
</div>
<div style="clear:left"></div>
<div class="discuss-widgets">
<div class="discuss-text">
{{ form.discuss_text.label_tag }}:
{% if discuss %}<span class="last-edited">(last edited {{ discuss.date }})</span>{% endif %}
</div>
{{ form.discuss_text.errors }}
{{ form.discuss_text }}
</div>
@ -62,12 +65,10 @@ form.position-form .comment-text {
<div class="actions">
<a href="{{ return_to_url }}">Back</a>
<input type="submit" name="send_mail" value="Save and send email"/>
<input type="submit" value="Save"/>
</div>
{{ form.return_to_url }}
{{ form.return_to_url }}
</form>
{% endblock %}

View file

@ -11,6 +11,13 @@ The IESG has received a request from {{ group }} to consider the following docum
The IESG plans to make a decision in the next few weeks, and solicits final comments on this action. Please send substantive comments to the ietf@ietf.org mailing lists by {{ expiration_date }}. Exceptionally, comments may be sent to iesg@ietf.org instead. In either case, please retain the beginning of the Subject line to allow automated sorting.{% endfilter %}
Abstract{{ docs|pluralize }}
{% for d in docs %}
{{ d.abstract}}
{% endfor %}
The file{{ urls|pluralize }} can be obtained via
{% for u in urls %}{{ u }}
{% endfor %}{% if impl_report %}

View file

@ -8,6 +8,8 @@
<form action="" method="POST">
<p>Undefer the ballot for {{ doc.file_tag }}?</p>
<p>The ballot will then be on the IESG agenda of {{ telechat_date }}.</p>
<div class="actions">
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
<input type="submit" value="Undefer ballot"/>

16
static/js/lib/jquery-1.5.1.min.js vendored Normal file

File diff suppressed because one or more lines are too long