forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_telechat_date.html
More file actions
55 lines (42 loc) · 1.54 KB
/
edit_telechat_date.html
File metadata and controls
55 lines (42 loc) · 1.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
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load bootstrap3 %}
{% block title %}Set telechat date for {{ doc.name }}{% endblock %}
{% block content %}
{% origin %}
<h1>Set telechat date<br><small>{{ doc.name }} ({{ doc.pages }} page{{ doc.pages|pluralize }})</small></h1>
{% for warning in warnings %}
<div class="alert alert-warning">{{ warning }}</div>
{% endfor %}
<form method="post">
{% csrf_token %}
{% bootstrap_form form %}
<div id="large_page_count_warning" class="hidden-nojs alert alert-warning">
Putting the document on this telechat gives the telechat a very large document page count. Please consider choosing another telechat date for this document.
</div>
{% buttons %}
<button type="submit" class="btn btn-primary">Save</button>
<a class="btn btn-default pull-right" href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">Back</a>
{% endbuttons %}
</form>
{% endblock %}
{% block js %}
<script>
var pages = {};
{% for date,count in form.page_count.items %}
pages['{{date}}'] = {{count}};
{% endfor %}
$("#large_page_count_warning").hide();
function toggleWarning(date) {
if ( date==="" | pages[date] + {{ doc.pages }} < 400 ) {
$("#large_page_count_warning").hide();
} else {
$("#large_page_count_warning").show();
}
}
$("select[name='telechat_date']").change(function () {
toggleWarning($(this).val());
});
</script>
{% endblock %}