diff options
| author | rubenwardy <rw@rubenwardy.com> | 2019-01-28 23:16:51 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2019-01-28 23:17:00 +0000 |
| commit | f822027ec590b4c92dad85d5499f6e478a5e472c (patch) | |
| tree | 328e7ada62c5574651a88ed6f99736f53816f1f1 /app/templates | |
| parent | 034315d421c01c5524565d24e3f7fd3666a77ee1 (diff) | |
| download | cheatdb-f822027ec590b4c92dad85d5499f6e478a5e472c.tar.xz | |
Hide create release fields depending on radio buttons
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/packages/release_new.html | 15 | ||||
| -rw-r--r-- | app/templates/packages/view.html | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/app/templates/packages/release_new.html b/app/templates/packages/release_new.html index 69fe91e..45a832f 100644 --- a/app/templates/packages/release_new.html +++ b/app/templates/packages/release_new.html @@ -17,7 +17,7 @@ {{ render_field(form.vcsLabel, class_="mt-3") }} {% endif %} - {{ render_field(form.fileUpload, fieldclass="form-control-file") }} + {{ render_field(form.fileUpload, fieldclass="form-control-file", class_="mt-3") }} <div class="row"> {{ render_field(form.min_rel, class_="col-sm-6") }} @@ -41,4 +41,17 @@ {% block scriptextra %} <script src="/static/release_minmax.js?v=1"></script> + <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> {% endblock %} diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index 2150a8c..f28a18c 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -240,6 +240,7 @@ <div class="float-right"> {% if package.checkPerm(current_user, "MAKE_RELEASE") %} <a href="{{ package.getBulkReleaseURL() }}">bulk</a> + | <a href="{{ package.getCreateReleaseURL() }}">+</a> {% endif %} </div> |
