From 9830683aed14acf42670df7a19a89bd02af3a41e Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 12 Aug 2020 13:11:25 +0200 Subject: luci-app-mwan3: only show port options if proto is tcp or udp Signed-off-by: Florian Eckert --- applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua index 5bf4a4baf..e7cb30225 100644 --- a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/ruleconfig.lua @@ -30,6 +30,8 @@ o.datatype = ipaddr o = s:option(Value, "src_port", translate("Source port"), translate("May be entered as a single or multiple port(s) (eg \"22\" or \"80,443\") or as a portrange (eg \"1024:2048\") without quotes")) +o:depends("proto", "tcp") +o:depends("proto", "udp") o = s:option(Value, "dest_ip", translate("Destination address"), translate("Supports CIDR notation (eg \"192.168.100.0/24\") without quotes")) @@ -37,6 +39,8 @@ o.datatype = ipaddr o = s:option(Value, "dest_port", translate("Destination port"), translate("May be entered as a single or multiple port(s) (eg \"22\" or \"80,443\") or as a portrange (eg \"1024:2048\") without quotes")) +o:depends("proto", "tcp") +o:depends("proto", "udp") o = s:option(Value, "proto", translate("Protocol"), translate("View the content of /etc/protocols for protocol description")) -- cgit v1.2.3