2018-03-20 19:40:19 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Create a release | {{ package.title }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2018-12-22 23:29:30 +01:00
|
|
|
{% from "macros/forms.html" import render_field, render_submit_field, render_radio_field %}
|
2018-03-23 18:05:07 +01:00
|
|
|
<form method="POST" action="" enctype="multipart/form-data">
|
2018-03-20 19:40:19 +01:00
|
|
|
{{ form.hidden_tag() }}
|
|
|
|
|
2018-05-29 23:43:42 +02:00
|
|
|
{{ render_field(form.title, placeholder="Human readable. Eg: 1.0.0 or 2018-05-28") }}
|
2018-12-22 23:29:30 +01:00
|
|
|
<p class="mb-0">Method</p>
|
|
|
|
{{ render_radio_field(form.uploadOpt) }}
|
|
|
|
|
2018-06-06 00:13:39 +02:00
|
|
|
{% if package.repo %}
|
2018-12-22 23:29:30 +01:00
|
|
|
{{ render_field(form.vcsLabel, class_="mt-3") }}
|
2018-05-24 20:02:27 +02:00
|
|
|
{% endif %}
|
2018-12-22 23:29:30 +01:00
|
|
|
|
2019-01-29 00:16:51 +01:00
|
|
|
{{ render_field(form.fileUpload, fieldclass="form-control-file", class_="mt-3") }}
|
2019-01-28 21:48:07 +01:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
{{ render_field(form.min_rel, class_="col-sm-6") }}
|
|
|
|
{{ render_field(form.max_rel, class_="col-sm-6") }}
|
|
|
|
</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>
|
|
|
|
|
2018-03-20 19:40:19 +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:16:51 +01:00
|
|
|
<script>
|
|
|
|
function check_opt() {
|
|
|
|
if ($("input[name=uploadOpt]:checked").val() == "vcs") {
|
|
|
|
$("#fileUpload").parent().hide();
|
|
|
|
$("#vcsLabel").parent().show();
|
|
|
|
} else {
|
|
|
|
$("#fileUpload").parent().show();
|
|
|
|
$("#vcsLabel").parent().hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("input[name=uploadOpt]").change(check_opt);
|
|
|
|
check_opt();
|
|
|
|
</script>
|
2019-01-28 23:28:47 +01:00
|
|
|
{% endblock %}
|