diff --git a/dashboard-ui/scripts/dashboardhosting.js b/dashboard-ui/scripts/dashboardhosting.js index 9a30fb97d3..b2d9450590 100644 --- a/dashboard-ui/scripts/dashboardhosting.js +++ b/dashboard-ui/scripts/dashboardhosting.js @@ -1,14 +1,14 @@ define(['jQuery'], function ($) { function onSubmit() { - Dashboard.showLoadingMsg(); - var form = this; var localAddress = form.querySelector('#txtLocalAddress').value; var enableUpnp = $('#chkEnableUpnp', form).checked(); confirmSelections(localAddress, enableUpnp, function () { + Dashboard.showLoadingMsg(); + ApiClient.getServerConfiguration().then(function (config) { config.HttpServerPortNumber = $('#txtPortNumber', form).val(); @@ -32,7 +32,7 @@ function confirmSelections(localAddress, enableUpnp, callback) { - if (localAddress) { + if (localAddress || !enableUpnp) { require(['alert'], function (alert) { alert({