From dec6868a5582fcf5a22fcd38b4ffa6816906d29a Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Sat, 11 Apr 2020 14:14:05 -0600 Subject: [PATCH] Persist nest_id, egg_id, pack_id --- .../themes/pterodactyl/js/admin/new-server.js | 10 ++--- resources/views/admin/servers/new.blade.php | 40 ++++++++++++++----- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/public/themes/pterodactyl/js/admin/new-server.js b/public/themes/pterodactyl/js/admin/new-server.js index cf8766356..d52502f33 100644 --- a/public/themes/pterodactyl/js/admin/new-server.js +++ b/public/themes/pterodactyl/js/admin/new-server.js @@ -43,7 +43,7 @@ $(document).ready(function() { }); }); -var lastActiveBox = null; +let lastActiveBox = null; $(document).on('click', function (event) { if (lastActiveBox !== null) { lastActiveBox.removeClass('box-primary'); @@ -79,8 +79,8 @@ $('#pNestId').on('change', function (event) { }); $('#pEggId').on('change', function (event) { - var parentChain = _.get(Pterodactyl.nests, $('#pNestId').val(), null); - var objectChain = _.get(parentChain, 'eggs.' + $(this).val(), null); + let parentChain = _.get(Pterodactyl.nests, $('#pNestId').val(), null); + let objectChain = _.get(parentChain, 'eggs.' + $(this).val(), null); $('#pDefaultContainer').val(_.get(objectChain, 'docker_image', 'not defined!')); @@ -103,8 +103,8 @@ $('#pEggId').on('change', function (event) { $('#appendVariablesTo').html(''); $.each(_.get(objectChain, 'variables', []), function (i, item) { - var isRequired = (item.required === 1) ? 'Required ' : ''; - var dataAppend = ' \ + let isRequired = (item.required === 1) ? 'Required ' : ''; + let dataAppend = ' \
\ \ \ diff --git a/resources/views/admin/servers/new.blade.php b/resources/views/admin/servers/new.blade.php index 59011aa46..b3418347e 100644 --- a/resources/views/admin/servers/new.blade.php +++ b/resources/views/admin/servers/new.blade.php @@ -313,6 +313,19 @@ @endsection