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
44 lines (41 loc) · 1.66 KB
/
edit_telechat_date.html
File metadata and controls
44 lines (41 loc) · 1.66 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
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block title %}Set telechat date for {{ doc.name }}{% endblock %}
{% block content %}
{% origin %}
<h1>
Set telechat date
<br>
<small class="text-muted">{{ doc.name }} ({{ doc.pages }} page{{ doc.pages|pluralize }})</small>
</h1>
{% for warning in warnings %}<div class="alert alert-warning my-3">{{ warning }}</div>{% endfor %}
<form method="post">
{% csrf_token %}
{% bootstrap_form form %}
<div id="large_page_count_warning" class="alert alert-warning my-3">
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>
<button type="submit" class="btn btn-primary">Save</button>
<a class="btn btn-secondary float-end"
href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">Back</a>
</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']").on("change", function () {
toggleWarning($(this).val());
});
</script>
{% endblock %}