From ec0e89c21db155ae3e1b0d2ab86286eaa96d1995 Mon Sep 17 00:00:00 2001 From: rubenwardy <rw@rubenwardy.com> Date: Sat, 29 Dec 2018 18:41:09 +0000 Subject: [PATCH] Fix bug in package_create.js --- app/public/static/package_create.js | 2 +- app/templates/packages/create_edit.html | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/public/static/package_create.js b/app/public/static/package_create.js index 0dc363e0..a115b14f 100644 --- a/app/public/static/package_create.js +++ b/app/public/static/package_create.js @@ -21,7 +21,7 @@ $(function() { $(".pkg_repo").hide() function setField(id, value) { - if (value != "") { + if (value && value != "") { var ele = $(id); ele.val(value); ele.trigger("change"); diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html index e6fe4001..4323d61b 100644 --- a/app/templates/packages/create_edit.html +++ b/app/templates/packages/create_edit.html @@ -14,13 +14,7 @@ {% if enable_wizard %} <script src="/static/url.min.js"></script> <script src="/static/polltask.js"></script> - <script src="/static/package_create.js?v=2"></script> - <noscript> - <div class="alert alert-warning"> - <span class="icon_message"></span> - Javascript is needed to automatically import metadata from VCS. - </div> - </noscript> + <script src="/static/package_create.js?v=3"></script> {% endif %} <script src="/static/package_edit.js?v=3"></script> {% endblock %} @@ -34,6 +28,13 @@ Have you read the Package Inclusion Policy and Guidance yet? </div> + <noscript> + <div class="alert alert-warning"> + Javascript is needed to improve the user interface, and is needed for features + such as finding metadata from git, and autocompletion.<br /> + Whilst disabled Javascript may work, it is not officially supported. + </div> + </noscript> {{ package_lists() }}