forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchange_state.html
More file actions
78 lines (65 loc) · 2.54 KB
/
change_state.html
File metadata and controls
78 lines (65 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{% 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>
{% if not option %}
<p><a class="btn btn-info" href="{% url 'ietf.doc.views_help.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 "ietf.doc.views_doc.document_main" 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 %}