forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchange_stream_state.html
More file actions
42 lines (42 loc) · 1.47 KB
/
change_stream_state.html
File metadata and controls
42 lines (42 loc) · 1.47 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
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block title %}Change {{ state_type.label }} for {{ doc }}{% endblock %}
{% block content %}
{% origin %}
<h1>
Change {{ state_type.label }}
<br>
<small class="text-muted">{{ doc }}</small>
</h1>
{% if next_states %}
<a class="my-3 btn btn-info"
href="{% url 'ietf.doc.views_help.state_help' type=state_type.slug %}">Help on states</a>
<p>
<b>Move document to {{ next_states|pluralize:"to one of" }} the recommended next state{{ next_states|pluralize }}:</b>
</p>
{% for state in next_states %}
<button class="btn btn-primary next-state" data-state="{{ state.pk }}">{{ state.name }}</button>
{% endfor %}
{% endif %}
<form class="mt-5" method="post">
{% csrf_token %}
{% bootstrap_form form %}
<button type="submit" class="btn btn-primary">Submit</button>
<a class="btn btn-secondary float-end" href="{{ doc.get_absolute_url }}">Back</a>
</form>
{% endblock %}
{% block js %}
<script>
$(document).ready(function () {
$("button.next-state").click(function (e) {
var s = $(this).data("state");
if (s) {
e.preventDefault();
$("#id_new_state").val(s);
}
});
});
</script>
{% endblock %}