diff --git a/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php b/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
index ef636c2c5..3384039bf 100644
--- a/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
+++ b/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
@@ -1153,7 +1153,7 @@ _(Container Network)_:
-
+
_(Use Tailscale)_:
: onchange="showTailscale(this)">
@@ -1161,6 +1161,13 @@ _(Use Tailscale)_:
+
+_(Use Tailscale)_:
+: _(Option disabled as Network type is not bridge or custom)_
+
+:docker_tailscale_help:
+
+
_(NOTE)_:
: _(This option will install Tailscale and dependencies into the container.)_
@@ -1536,8 +1543,13 @@ function showSubnet(bridge) {
$('#netCONT').val('');
}
// make sure to re-trigger Tailscale check when network is changed
- if ($('#contTailscale').prop('checked')) {
- showTailscale(true);
+ if (bridge.match(/^(host|container)$/i) !== null) {
+ $('#contTailscale').click().switchButton({checked: false}).prop('checked',false);
+ $(".TSNetworkAllowed").hide();
+ $(".TSNetworkNotAllowed").show();
+ } else {
+ $(".TSNetworkAllowed").show();
+ $(".TSNetworkNotAllowed").hide();
}
}
@@ -1689,6 +1701,12 @@ function showTSAdvanced(checked) {
}
function showTailscale(source) {
+ var bridge = $('select[name="contNetwork"]').val();
+ if (bridge.match(/^(host|container)$/i) !== null) {
+ $('#contTailscale').click().switchButton({checked: false}).prop('checked',false);
+ $(".TSNetworkAllowed").hide();
+ $(".TSNetworkNotAllowed").show();
+ }
if (!$.trim($('#TSallowlanaccess').val())) {
$('#TSallowlanaccess').val('false');
}