datatracker/ietf/templates/doc/charter/change_state.html
Henrik Levkowetz 942352c50b Merged in [9766] from lars@netapp.com:
More HTML fixes.
 - Legacy-Id: 9787
Note: SVN reference [9766] has been migrated to Git commit 77f555bdbdfa653e4b5a0589ead9eda6632f10d7
2015-07-18 12:42:38 +00:00

81 lines
2.5 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load bootstrap3 %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
{% origin %}
<h1>{{ title }}</h1>
{% bootstrap_messages %}
{% if not option %}
<p><a class="btn btn-info" href="{% url "state_help" type="charter" %}">Help on states</a></p>
{% endif %}
<form method="post">
{% csrf_token %}
{% for field in form.visible_fields %}
{% bootstrap_field field %}
{% if field.name == "charter_state" and chartering_type == "rechartering" %}
<div class="checkbox ballot-wo-extern">
<label>
<input type="checkbox" name="ballot_wo_extern">
<b>Ask whether external review can be skipped in ballot</b>
</label>
</div>
{% endif %}
{% endfor %}
{% if initial_review %}
<p class="alert alert-warning"><b>Warning:</b> Announced initial review time hasn't elapsed yet. It does so at {{ initial_review.expires }}.</p>
{% endif %}
{% buttons %}
{% if option == "initcharter" or option == "recharter" %}
<button class="btn btn-primary" type="submit">Initiate chartering</button>
{% endif %}
{% if not option or option == "abandon" %}
<button class="btn btn-primary" type="submit">Save & notify secretariat</button>
<a class="btn btn-default pull-right" href="{% url "doc_view" name=doc.name %}">Back</a>
{% endif %}
{% endbuttons %}
</form>
{% if prev_state %}
<h3>Or revert to previous state</h3>
<div class="prev-state">
<form method="post">{% csrf_token %}
<input type="hidden" name="charter_state" value="{{ prev_charter_state.pk }}" />
<input type="hidden" name="state" value="{{ prev_state.slug }}" />
<input type="submit" value="Back to {{ prev_charter_state.name }}" />
</form>
</div>
{% endif %}
{% endblock %}
{% block js %}
<script>
var info_msg = {{ info_msg|safe }}, statesForBallotWoExtern = {{ states_for_ballot_wo_extern }};
$(document).ready(function () {
function stateChanged() {
var v = $(this).val();
$("#id_message").val(info_msg[v] || "");
if ($.inArray(+v, statesForBallotWoExtern) != -1)
$(".ballot-wo-extern").show();
else
$(".ballot-wo-extern").hide();
}
$("#id_charter_state").click(stateChanged).change(stateChanged).keydown(stateChanged);
$("#id_charter_state").click();
});
</script>
{% endblock %}