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 #900
 - Legacy-Id: 5000
This commit is contained in:
Robert Sparks 2012-11-03 18:29:07 +00:00
parent 1a887c1f7f
commit 2470ad77dd
4 changed files with 6 additions and 156 deletions

View file

@ -519,14 +519,6 @@ class BallotWriteupForm(forms.ModelForm):
def clean_ballot_writeup(self):
return self.cleaned_data["ballot_writeup"].replace("\r", "")
class ApprovalTextForm(forms.ModelForm):
class Meta:
model = BallotInfo
fields = ["approval_text"]
def clean_approval_text(self):
return self.cleaned_data["approval_text"].replace("\r", "")
@group_required('Area_Director','Secretariat')
def lastcalltext(request, name):
"""Editing of the last call text"""
@ -848,64 +840,15 @@ if settings.USE_DB_REDESIGN_PROXY_CLASSES:
ballot_writeupnotes = ballot_writeupnotesREDESIGN
@group_required('Area_Director','Secretariat')
def ballot_approvaltext(request, name):
"""Editing of approval text"""
doc = get_object_or_404(InternetDraft, filename=name)
if not doc.idinternal:
raise Http404()
login = IESGLogin.objects.get(login_name=request.user.username)
try:
ballot = doc.idinternal.ballot
except BallotInfo.DoesNotExist:
ballot = generate_ballot(request, doc)
approval_text_form = ApprovalTextForm(instance=ballot)
if request.method == 'POST':
if "save_approval_text" in request.POST:
approval_text_form = ApprovalTextForm(request.POST, instance=ballot)
if approval_text_form.is_valid():
ballot.approval_text = approval_text_form.cleaned_data["approval_text"]
add_document_comment(request, doc, "Approval announcement text changed")
ballot.save()
if "regenerate_approval_text" in request.POST:
ballot.approval_text = generate_approval_mail(request, doc)
add_document_comment(request, doc, "Approval announcement text regenerated")
ballot.save()
# make sure form has the updated text
approval_text_form = ApprovalTextForm(instance=ballot)
doc.idinternal.event_date = date.today()
doc.idinternal.save()
can_announce = doc.idinternal.cur_state_id > 19
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]
need_intended_status = ", ".join(docs_with_invalid_status)
return render_to_response('idrfc/ballot_approvaltext.html',
dict(doc=doc,
back_url=doc.idinternal.get_absolute_url(),
ballot=ballot,
approval_text_form=approval_text_form,
can_announce=can_announce,
need_intended_status=need_intended_status,
),
context_instance=RequestContext(request))
class ApprovalTextFormREDESIGN(forms.Form):
class ApprovalTextForm(forms.Form):
approval_text = forms.CharField(widget=forms.Textarea, required=True)
def clean_approval_text(self):
return self.cleaned_data["approval_text"].replace("\r", "")
@group_required('Area_Director','Secretariat')
def ballot_approvaltextREDESIGN(request, name):
def ballot_approvaltext(request, name):
"""Editing of approval text"""
doc = get_object_or_404(Document, docalias__name=name)
if not doc.get_state("draft-iesg"):
@ -936,7 +879,7 @@ def ballot_approvaltextREDESIGN(request, name):
e = generate_approval_mail(request, doc)
# make sure form has the updated text
form = ApprovalTextForm(initial=dict(approval_text=existing.text))
form = ApprovalTextForm(initial=dict(approval_text=e.text))
can_announce = doc.get_state("draft-iesg").order > 19
need_intended_status = ""
@ -952,9 +895,6 @@ def ballot_approvaltextREDESIGN(request, name):
),
context_instance=RequestContext(request))
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
ApprovalTextForm = ApprovalTextFormREDESIGN
ballot_approvaltext = ballot_approvaltextREDESIGN
@group_required('Secretariat')
def approve_ballot(request, name):

View file

@ -1,90 +0,0 @@
{% extends "base.html" %}
{% block title %}Ballot writeups for {{ doc }}{% endblock %}
{% block morecss %}
form #id_last_call_text {
width: 700px;
height: 300px;
}
form #id_ballot_writeup {
width: 700px;
height: 300px;
}
form #id_approval_text {
width: 700px;
height: 300px;
}
{% endblock %}
{% block content %}
<h1>Ballot writeups for {{ doc }}</h1>
<form action="" method="POST">
<h2>Last Call Announcement Text</h2>
{{ last_call_form.last_call_text }}
<p>{{ last_call_form.last_call_text.errors }}</p>
{% if can_request_last_call and need_intended_status %}
<p>You need to select intended status of {{ need_intended_status }} and regenerate last call text to request last call.</p>
{% endif %}
<div class="actions">
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
<input type="submit" name="save_last_call_text" value="Save Last Call Text" />
<input type="submit" name="regenerate_last_call_text" value="Regenerate Last Call Text" />
{% if can_request_last_call and not need_intended_status %}
<input style="margin-left: 8px" type="submit" name="send_last_call_request" value="Save and Request Last Call" />
{% endif %}
</div>
</form>
<form action="" method="POST">
<h2>Ballot Writeup and Notes</h2>
<p>(Technical Summary, Working Group Summary, Document Quality,
Personnel, RFC Editor Note, IRTF Note, IESG Note, IANA Note)</p>
<p>This text will be appended to all announcements and messages to
the IRTF or RFC Editor.</p>
{{ ballot_writeup_form.ballot_writeup }}
<div class="actions">
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
<input type="submit" name="save_ballot_writeup" value="Save Ballot Writeup" />
<input style="margin-left: 8px" type="submit" name="issue_ballot" value="Save and {% if ballot.ballot_issued %}Re-{% endif %}Issue Ballot" />
</div>
</form>
<form action="" method="POST">
<h2>Ballot Approval Announcement Text</h2>
<p>Sent after approval.</p>
{{ approval_text_form.approval_text }}
<div class="actions">
<a href="{{ doc.idinternal.get_absolute_url }}">Back</a>
<input type="submit" name="save_approval_text" value="Save Approval Announcement Text" />
<input type="submit" name="regenerate_approval_text" value="Regenerate Approval Announcement Text" />
</div>
</form>
{% load ietf_filters %}
{% if user|in_group:"Secretariat" %}
<p>
{% if can_make_last_call %}
<a href="{% url doc_make_last_call name=doc.filename %}">Make Last Call</a>
{% endif %}
{% if can_announce %}
<a href="{% url doc_approve_ballot name=doc.filename %}">Approve ballot</a>
{% endif %}
</p>
{% endif %}
{% endblock%}

View file

@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% else %}
{% if stream_info.stream.name == 'ISE' or stream_info.stream.name == 'IRTF' %}
{% if user|in_group:"Secretariat" and not info.conflict_reviews %}
<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>
<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>
{% endif %}
{% else %}
{% if stream_info.stream.name == 'IETF'%}{%if not doc.in_ietf_process %}

View file

@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<tr><td>Intended RFC status:</td><td>
{% with user|in_group:"Area_Director,Secretariat" as add_link %}
{% if add_link %}<a class="editlink" href="{% url doc_change_intended_status name=doc.draft_name %}">{% endif %}
{{ doc.underlying_document.intended_std_level|default:"-" }}
{{ doc.underlying_document.intended_std_level|default:"(None)" }}
{% if add_link %}</a>{% endif %}
{% endwith %}
</td></tr>
@ -142,7 +142,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<tr><td>Responsible AD:</td><td>
{% with user|in_group:"Area_Director,Secretariat" as add_link %}
{% if add_link %}<a class="editlink" href="{% url doc_change_ad name=doc.draft_name %}">{% endif %}
{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"-"|escape }}{%else%}-{%endif%}
{% if doc.in_ietf_process %}{{ doc.ietf_process.ad_name|default:"(None)"|escape }}{%else%}(None){%endif%}
{% if add_link %}</a>{% endif %}
{% endwith %}
</td></tr>