{% 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%}
