diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php old mode 100644 new mode 100755 index 5f668838c8..ddb47ab812 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -103,8 +103,8 @@ 'autoport' => 'yes', 'model' => 'qxl', 'keymap' => 'none', - 'port' => -1 , - 'wsport' => -1, + 'port' => 5900, + 'wsport' => 5901, 'copypaste' => 'no', 'render' => 'auto', 'DisplayOptions' => "" @@ -1325,9 +1325,9 @@ ?> _(VM Console Port)_: - + _(VM Console WS Port)_: - + @@ -2088,6 +2088,18 @@ var storageType = ""; var storageLoc = ""; +function checkVNCPorts() { + const port = $("#port").val(); + const wsport = $("#wsport").val(); + if (port < 5900 || port > 65535 || wsport < 5900 || wsport > 65535 || port == wsport) { + swal({ + title: "_(Invalid Port)_", + text: "_(VNC/SPICE ports must be between 5900 and 65535, and cannot be equal to each other)_", + type: "error", + confirmButtonText: "_(Ok)_" + }); + } +} function updateMAC(index, port) { var wlan0 = ''; // mac address of wlan0 var mac = $('input[name="nic['+index+'][mac]"');