Skip to content

Commit 6484874

Browse files
committed
1) Restructured the position editing page to better integrate the defer button.
Fixes bug ietf-tools#659 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. 2 and 3 together fix bug ietf-tools#660 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. Fixes bug ietf-tools#661 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. Fixes bug ietf-tools#662 6) Removed the old tracker link from the document's main page Fixes bug ietf-tools#663 _M . M ietf/idrfc/views_ballot.py M ietf/templates/idrfc/last_call_announcement.txt M ietf/templates/idrfc/undefer_ballot.html M ietf/templates/idrfc/doc_tab_document.html M ietf/templates/idrfc/edit_position.html _M ietf/utils/draft.py _M static/media A + static/js/lib/jquery-1.5.1.min.js - Legacy-Id: 3107
2 parents 86f42b4 + 024a74a commit 6484874

6 files changed

Lines changed: 56 additions & 25 deletions

File tree

ietf/idrfc/views_ballot.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ class EditPositionForm(forms.Form):
5959
discuss_text = forms.CharField(required=False, widget=forms.Textarea)
6060
comment_text = forms.CharField(required=False, widget=forms.Textarea)
6161
return_to_url = forms.CharField(required=False, widget=forms.HiddenInput)
62+
def clean_discuss_text(self):
63+
entered_discuss = self.cleaned_data["discuss_text"]
64+
entered_pos = self.cleaned_data["position"]
65+
if entered_pos == "discuss" and not entered_discuss:
66+
print "Raising discuss ",entered_pos," ",entered_discuss
67+
raise forms.ValidationError("You must enter a non-empty discuss")
68+
return entered_discuss
6269

6370
@group_required('Area_Director','Secretariat')
6471
def edit_position(request, name):
@@ -164,7 +171,13 @@ def edit_position(request, name):
164171
qstr += "&ad=%s" % request.GET.get('ad')
165172
return HttpResponseRedirect(urlreverse("doc_send_ballot_comment", kwargs=dict(name=doc.filename)) + qstr)
166173
else:
167-
return HttpResponseRedirect(return_to_url)
174+
if request.POST.get("Defer"):
175+
return HttpResponseRedirect(urlreverse("doc_defer_ballot", kwargs=dict(name=doc)))
176+
else:
177+
if request.POST.get("Undefer"):
178+
return HttpResponseRedirect(urlreverse("doc_undefer_ballot", kwargs=dict(name=doc)))
179+
else:
180+
return HttpResponseRedirect(return_to_url)
168181
else:
169182
initial = {}
170183
if pos:
@@ -307,12 +320,14 @@ def undefer_ballot(request, name):
307320
raise Http404()
308321

309322
login = IESGLogin.objects.get(login_name=request.user.username)
323+
telechat_date = TelechatDates.objects.all()[0].date1
310324

311325
if request.method == 'POST':
312326
doc.idinternal.ballot.defer = False
313327
doc.idinternal.ballot.save()
314328

315329
doc.idinternal.change_state(IDState.objects.get(document_state_id=IDState.IESG_EVALUATION), None)
330+
doc.idinternal.telechat_date = telechat_date
316331
doc.idinternal.event_date = date.today()
317332
doc.idinternal.save()
318333

@@ -321,7 +336,7 @@ def undefer_ballot(request, name):
321336
return HttpResponseRedirect(doc.idinternal.get_absolute_url())
322337

323338
return render_to_response('idrfc/undefer_ballot.html',
324-
dict(doc=doc),
339+
dict(doc=doc,telechat_date=telechat_date),
325340
context_instance=RequestContext(request))
326341

327342
class LastCallTextForm(forms.ModelForm):

ietf/templates/idrfc/doc_tab_document.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@
6565
{% endif %}
6666
{% endifequal %}
6767

68-
{# links to old system #}
69-
<span id="doc_edit_button" class="yui-button yui-link-button" style="margin-left:2px;"><span class="first-child">
70-
{% if doc.in_ietf_process %}
71-
<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>
72-
{% else %}
73-
<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>
74-
{% endif %}
75-
</span></span>
76-
{# end links to old #}
77-
7868
</div>
7969
{% endif %}{# if user in group #}
8070
{% endblock doc_metabuttons%}

ietf/templates/idrfc/edit_position.html

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,29 @@
3131
{% block content %}
3232
<h1>Change position for {{ ad }} on {{ doc }}</h1>
3333

34-
<form class="position-form" action="" method="POST">
35-
36-
<div>
37-
<div class="position">{{ form.position }}</div>
38-
3934
{% if ballot.was_deferred %}
40-
<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>
4135
<div style="margin-top:8px; margin-bottom:8px;">Ballot deferred by {{ ballot.deferred_by }} on {{ ballot.deferred_date }}.</div>
42-
{% else %}
43-
<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>
4436
{% endif %}
37+
38+
<form class="position-form" action="" method="POST">
39+
40+
<div>
41+
<span class="position">{{ form.position }}</span>
42+
<span class="actions">
43+
<input type="submit" name="send_mail" value="Save and send email"/>
44+
<input type="submit" value="Save"/>
45+
{% if ballot.was_deferred %}<input type="submit" name="Undefer" value="Undefer"/>{% else %}<input type="submit" name="Defer" value="Defer"/>{% endif %}
46+
</span>
4547
</div>
4648

4749
<div style="clear:left"></div>
48-
50+
4951
<div class="discuss-widgets">
5052
<div class="discuss-text">
5153
{{ form.discuss_text.label_tag }}:
5254
{% if discuss %}<span class="last-edited">(last edited {{ discuss.date }})</span>{% endif %}
5355
</div>
56+
{{ form.discuss_text.errors }}
5457
{{ form.discuss_text }}
5558
</div>
5659

@@ -62,12 +65,10 @@ <h1>Change position for {{ ad }} on {{ doc }}</h1>
6265

6366
<div class="actions">
6467
<a href="{{ return_to_url }}">Back</a>
65-
<input type="submit" name="send_mail" value="Save and send email"/>
66-
<input type="submit" value="Save"/>
6768
</div>
68-
69-
{{ form.return_to_url }}
7069

70+
{{ form.return_to_url }}
71+
7172
</form>
7273
{% endblock %}
7374

ietf/templates/idrfc/last_call_announcement.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ The IESG has received a request from {{ group }} to consider the following docum
1111

1212
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 %}
1313

14+
Abstract{{ docs|pluralize }}
15+
16+
{% for d in docs %}
17+
{{ d.abstract}}
18+
19+
{% endfor %}
20+
1421
The file{{ urls|pluralize }} can be obtained via
1522
{% for u in urls %}{{ u }}
1623
{% endfor %}{% if impl_report %}

ietf/templates/idrfc/undefer_ballot.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ <h1>Undefer ballot for {{ doc }}</h1>
88
<form action="" method="POST">
99
<p>Undefer the ballot for {{ doc.file_tag }}?</p>
1010

11+
<p>The ballot will then be on the IESG agenda of {{ telechat_date }}.</p>
12+
1113
<div class="actions">
1214
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
1315
<input type="submit" value="Undefer ballot"/>

static/js/lib/jquery-1.5.1.min.js

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)