2019-01-28 22:49:29 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Create a release | {{ package.title }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<h1>Bulk Change Releases</h1>
|
|
|
|
|
|
|
|
<p class="mb-5">
|
|
|
|
Use this page to set the min and max of all releases for your package.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
|
|
|
|
<form method="POST" action="">
|
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
{{ render_checkbox_field(form.set_min, class_="col-sm-2") }}
|
|
|
|
{{ render_field(form.min_rel, class_="col-sm-10") }}
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
{{ render_checkbox_field(form.set_max, class_="col-sm-2") }}
|
|
|
|
{{ render_field(form.max_rel, class_="col-sm-10") }}
|
|
|
|
</div>
|
|
|
|
|
2019-01-28 23:28:47 +01:00
|
|
|
<p id="minmax_warning" style="color:#f00; display: none;">
|
|
|
|
Maximum must be greater than or equal to the minimum!
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Note: Min and max versions will be used to hide the package on
|
|
|
|
platforms not within the range.
|
|
|
|
You cannot selected the oldest version for min or the newest version
|
|
|
|
for max as this does not make sense - you can't predict the future.
|
|
|
|
</p>
|
|
|
|
|
2019-01-28 22:49:29 +01:00
|
|
|
{{ render_submit_field(form.submit) }}
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|
2019-01-28 23:28:47 +01:00
|
|
|
|
|
|
|
{% block scriptextra %}
|
|
|
|
<script src="/static/release_minmax.js?v=1"></script>
|
2019-01-29 00:40:31 +01:00
|
|
|
<script>
|
|
|
|
function setup_toggle(type) {
|
|
|
|
var toggle = $("#set_" + type);
|
|
|
|
function on_change() {
|
|
|
|
if (toggle.is(":checked")) {
|
|
|
|
$("#" + type + "_rel").removeAttr("disabled");
|
|
|
|
$("#" + type + "_rel").parent().css("opacity", "1");
|
|
|
|
} else {
|
|
|
|
$("#" + type + "_rel").attr("disabled", "disabled");
|
|
|
|
$("#" + type + "_rel").parent().css("opacity", "0.4");
|
|
|
|
$("#" + type + "_rel").val($("#" + type + "_rel option:first-child").attr("value"));
|
|
|
|
$("#" + type + "_rel").change();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
toggle.change(on_change);
|
|
|
|
on_change();
|
|
|
|
}
|
|
|
|
|
|
|
|
setup_toggle("min");
|
|
|
|
setup_toggle("max");
|
|
|
|
</script>
|
2019-01-28 23:28:47 +01:00
|
|
|
{% endblock %}
|