luci-app-mwan3: only show port options if proto is tcp or udp

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2020-08-12 13:11:25 +02:00
parent aabded28c5
commit 9830683aed

View file

@ -30,6 +30,8 @@ o.datatype = ipaddr
o = s:option(Value, "src_port", translate("Source port"), 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")) 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"), o = s:option(Value, "dest_ip", translate("Destination address"),
translate("Supports CIDR notation (eg \"192.168.100.0/24\") without quotes")) 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"), 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")) 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"), o = s:option(Value, "proto", translate("Protocol"),
translate("View the content of /etc/protocols for protocol description")) translate("View the content of /etc/protocols for protocol description"))