datatracker/ietf/templates/doc/ballot/edit_position.html
Lars Eggert 9d5d9d5172
fix: replace deprecated bootstrap things (#5858)
* text-muted -> text-body-secondary

* navbar-dark is deprecated

* Remove FIXME block, not an issue anymore

* Remove `navbar-light`
2023-07-18 12:22:28 -05:00

81 lines
3.1 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block title %}Change position for {{ balloter.plain_name }}{% endblock %}
{% block content %}
{% origin %}
<h1>
Change position for {{ balloter.plain_name }}
<br>
<small class="text-body-secondary">{{ doc }}</small>
</h1>
{% if ballot.ballot_type.question %}
<div class="alert alert-warning my-3">
<b>{{ ballot.ballot_type.question }}</b>
</div>
{% endif %}
{% if ballot_deferred %}
<p class="alert alert-info my-3">
Ballot deferred by {{ ballot_deferred.by }} on {{ ballot_deferred.time|date:"Y-m-d" }}.
</p>
{% endif %}
<form method="post" id="ballot-form" class="my-3">
{% csrf_token %}
{% for field in form %}
{% if field.name == "discuss" %}<div id="div_id_discuss">{% endif %}
{% bootstrap_field field %}
{% if field.name == "discuss" and old_pos and old_pos.discuss_time %}
<div class="form-text mt-n3 mb-3">Last edited {{ old_pos.discuss_time }}</div>
{% elif field.name == "comment" and old_pos and old_pos.comment_time %}
<div class="form-text mt-n3 mb-3">Last edited {{ old_pos.comment_time }}</div>
{% endif %}
{% if field.name == "discuss" %}</div>{% endif %}
{% endfor %}
<div class="mt-3">
<button type="submit"
class="btn btn-primary"
name="send_mail"
value="Save and send email">Save &amp; send email</button>
<button type="submit" class="btn btn-primary">Save</button>
{% if doc.type_id == "draft" or doc.type_id == "conflrev" %}
{% if doc.stream.slug != "irtf" %}
{% if ballot_deferred %}
<button type="submit"
class="btn btn-warning"
name="Undefer"
value="Undefer">Undefer ballot</button>
{% else %}
<button type="submit"
class="btn btn-danger"
name="Defer"
value="Defer">Defer ballot</button>
{% endif %}
{% endif %}
{% endif %}
<a class="btn btn-secondary float-end"
href="{% url "ietf.doc.views_doc.document_main" name=doc.canonical_name %}">
Back
</a>
</div>
</form>
{% endblock %}
{% block js %}
<script>
var block_pos = {{ blocking_positions|safe }};
function discussToggle(val) {
if (val in block_pos) {
$("#div_id_discuss").show();
} else {
$("#div_id_discuss").hide();
}
}
$("input[name=position]").on("click", function () {
discussToggle($(this).val());
});
discussToggle($("input[name=position]:checked").val());
</script>
{% endblock %}