Skip to content

Commit 2470ad7

Browse files
committed
Made it more obvious when an intended status or shepherding AD is not set
Removed an unused template Show reset approval text immediately. Fixes bug ietf-tools#900 - Legacy-Id: 5000
1 parent 1a887c1 commit 2470ad7

4 files changed

Lines changed: 6 additions & 156 deletions

File tree

ietf/idrfc/views_ballot.py

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,6 @@ class Meta:
519519
def clean_ballot_writeup(self):
520520
return self.cleaned_data["ballot_writeup"].replace("\r", "")
521521

522-
class ApprovalTextForm(forms.ModelForm):
523-
class Meta:
524-
model = BallotInfo
525-
fields = ["approval_text"]
526-
527-
def clean_approval_text(self):
528-
return self.cleaned_data["approval_text"].replace("\r", "")
529-
530522
@group_required('Area_Director','Secretariat')
531523
def lastcalltext(request, name):
532524
"""Editing of the last call text"""
@@ -848,64 +840,15 @@ def ballot_writeupnotesREDESIGN(request, name):
848840
ballot_writeupnotes = ballot_writeupnotesREDESIGN
849841

850842

851-
@group_required('Area_Director','Secretariat')
852-
def ballot_approvaltext(request, name):
853-
"""Editing of approval text"""
854-
doc = get_object_or_404(InternetDraft, filename=name)
855-
if not doc.idinternal:
856-
raise Http404()
857-
858-
login = IESGLogin.objects.get(login_name=request.user.username)
859-
860-
try:
861-
ballot = doc.idinternal.ballot
862-
except BallotInfo.DoesNotExist:
863-
ballot = generate_ballot(request, doc)
864-
865-
approval_text_form = ApprovalTextForm(instance=ballot)
866-
867-
if request.method == 'POST':
868-
869-
if "save_approval_text" in request.POST:
870-
approval_text_form = ApprovalTextForm(request.POST, instance=ballot)
871-
if approval_text_form.is_valid():
872-
ballot.approval_text = approval_text_form.cleaned_data["approval_text"]
873-
add_document_comment(request, doc, "Approval announcement text changed")
874-
ballot.save()
875-
876-
if "regenerate_approval_text" in request.POST:
877-
ballot.approval_text = generate_approval_mail(request, doc)
878-
add_document_comment(request, doc, "Approval announcement text regenerated")
879-
ballot.save()
880-
881-
# make sure form has the updated text
882-
approval_text_form = ApprovalTextForm(instance=ballot)
883-
884-
doc.idinternal.event_date = date.today()
885-
doc.idinternal.save()
886-
887-
can_announce = doc.idinternal.cur_state_id > 19
888-
docs_with_invalid_status = [d.document().file_tag() for d in doc.idinternal.ballot_set() if "None" in d.document().intended_status.intended_status or "Request" in d.document().intended_status.intended_status]
889-
need_intended_status = ", ".join(docs_with_invalid_status)
890-
891-
return render_to_response('idrfc/ballot_approvaltext.html',
892-
dict(doc=doc,
893-
back_url=doc.idinternal.get_absolute_url(),
894-
ballot=ballot,
895-
approval_text_form=approval_text_form,
896-
can_announce=can_announce,
897-
need_intended_status=need_intended_status,
898-
),
899-
context_instance=RequestContext(request))
900843

901-
class ApprovalTextFormREDESIGN(forms.Form):
844+
class ApprovalTextForm(forms.Form):
902845
approval_text = forms.CharField(widget=forms.Textarea, required=True)
903846

904847
def clean_approval_text(self):
905848
return self.cleaned_data["approval_text"].replace("\r", "")
906849

907850
@group_required('Area_Director','Secretariat')
908-
def ballot_approvaltextREDESIGN(request, name):
851+
def ballot_approvaltext(request, name):
909852
"""Editing of approval text"""
910853
doc = get_object_or_404(Document, docalias__name=name)
911854
if not doc.get_state("draft-iesg"):
@@ -936,7 +879,7 @@ def ballot_approvaltextREDESIGN(request, name):
936879
e = generate_approval_mail(request, doc)
937880

938881
# make sure form has the updated text
939-
form = ApprovalTextForm(initial=dict(approval_text=existing.text))
882+
form = ApprovalTextForm(initial=dict(approval_text=e.text))
940883

941884
can_announce = doc.get_state("draft-iesg").order > 19
942885
need_intended_status = ""
@@ -952,9 +895,6 @@ def ballot_approvaltextREDESIGN(request, name):
952895
),
953896
context_instance=RequestContext(request))
954897

955-
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
956-
ApprovalTextForm = ApprovalTextFormREDESIGN
957-
ballot_approvaltext = ballot_approvaltextREDESIGN
958898

959899
@group_required('Secretariat')
960900
def approve_ballot(request, name):

ietf/templates/idrfc/ballot_writeups.html

Lines changed: 0 additions & 90 deletions
This file was deleted.

ietf/templates/idrfc/doc_tab_document.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% else %}
5959
{% if stream_info.stream.name == 'ISE' or stream_info.stream.name == 'IRTF' %}
6060
{% if user|in_group:"Secretariat" and not info.conflict_reviews %}
61-
<span id="doc_conflict_review_button" class="yui-button yui-link-button" style="margin-left:2px;">{% url conflict_review_start name=doc.draft_name as start_review_url %}{% if start_review_url %}<span class="first-child"><a href="{{start_review_url}}">Begin IETF Conflict Review</a></span>{% endif %}</span>
61+
<span id="doc_conflict_review_button" class="yui-button yui-link-button" style="margin-left:2px;">{% url conflict_review_start name=doc.draft_name as start_review_url %}{% if start_review_url %}<span class="first-child"><a href="{{start_review_url}}">Begin IETF Conflict Review {% if not doc.underlying_document.intended_std_level %}(note that intended status is not set){% endif %}</a></span>{% endif %}</span>
6262
{% endif %}
6363
{% else %}
6464
{% if stream_info.stream.name == 'IETF'%}{%if not doc.in_ietf_process %}

ietf/templates/idrfc/doc_tab_document_id.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<tr><td>Intended RFC status:</td><td>
5959
{% with user|in_group:"Area_Director,Secretariat" as add_link %}
6060
{% if add_link %}<a class="editlink" href="{% url doc_change_intended_status name=doc.draft_name %}">{% endif %}
61-
{{ doc.underlying_document.intended_std_level|default:"-" }}
61+
{{ doc.underlying_document.intended_std_level|default:"(None)" }}
6262
{% if add_link %}</a>{% endif %}
6363
{% endwith %}
6464
</td></tr>
@@ -142,7 +142,7 @@
142142
<tr><td>Responsible AD:</td><td>
143143
{% with user|in_group:"Area_Director,Secretariat" as add_link %}
144144
{% if add_link %}<a class="editlink" href="{% url doc_change_ad name=doc.draft_name %}">{% endif %}
145-
{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"-"|escape }}{%else%}-{%endif%}
145+
{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"(None)"|escape }}{%else%}(None){%endif%}
146146
{% if add_link %}</a>{% endif %}
147147
{% endwith %}
148148
</td></tr>

0 commit comments

Comments
 (0)