diff options
-rw-r--r-- | app/public/static/package_edit.js | 11 | ||||
-rw-r--r-- | app/templates/packages/create_edit.html | 18 |
2 files changed, 25 insertions, 4 deletions
diff --git a/app/public/static/package_edit.js b/app/public/static/package_edit.js new file mode 100644 index 0000000..40fbe44 --- /dev/null +++ b/app/public/static/package_edit.js @@ -0,0 +1,11 @@ +// @author rubenwardy +// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later + +$(function() { + $("#type").change(function() { + $(".not_mod, .not_game, .not_txp").show() + $(".not_" + this.value.toLowerCase()).hide() + }) + $(".not_mod, .not_game, .not_txp").show() + $(".not_" + $("#type").val().toLowerCase()).hide() +}) diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html index 8191a17..ee6e7cf 100644 --- a/app/templates/packages/create_edit.html +++ b/app/templates/packages/create_edit.html @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <h2>Create Package</h2> + <h1>Create Package</h1> <script> meta_packages = [ @@ -48,17 +48,26 @@ <form method="POST" action="" class="tableform"> {{ form.hidden_tag() }} + <h2 class="pkg_meta">Package</h2> + {{ render_field(form.name, class_="pkg_meta") }} {{ render_field(form.title, class_="pkg_meta") }} {{ render_field(form.shortDesc, class_="pkg_meta") }} {{ render_field(form.desc, class_="pkg_meta") }} {{ render_field(form.type, class_="pkg_meta") }} {{ render_field(form.license, class_="pkg_meta") }} - {{ render_mpackage_field(form.provides_str, class_="pkg_meta", placeholder="Comma separated list") }} - {{ render_deps_field(form.harddep_str, class_="pkg_meta", placeholder="Comma separated list") }} - {{ render_deps_field(form.softdep_str, class_="pkg_meta", placeholder="Comma separated list") }} {{ render_multiselect_field(form.tags, class_="pkg_meta") }} + <div class="pkg_meta"> + <h2 class="not_txp">Dependency Info</h2> + </div> + + {{ render_mpackage_field(form.provides_str, class_="pkg_meta not_txp", placeholder="Comma separated list") }} + {{ render_deps_field(form.harddep_str, class_="pkg_meta not_txp not_game", placeholder="Comma separated list") }} + {{ render_deps_field(form.softdep_str, class_="pkg_meta not_txp not_game", placeholder="Comma separated list") }} + + <h2 class="pkg_meta">Repository and Links</h2> + <div class="pkg_wiz_1"> <p>Enter the repo URL for the package. If it's hosted on Github then metadata will automatically be imported.</p> @@ -93,4 +102,5 @@ </div> </noscript> {% endif %} + <script src="/static/package_edit.js"></script> {% endblock %} |