Rules should not be removed / created from the detailed rule configuration
[project/luci.git] / applications / luci-fw / luasrc / model / cbi / luci_fw / trule.lua
index 2538c1b..f860bff 100644 (file)
@@ -16,6 +16,7 @@ m = Map("firewall", translate("firewall_rule"), translate("firewall_rule_desc"))
 
 s = m:section(NamedSection, arg[1], "rule", "")
 s.anonymous = true
+s.addremove = false
 
 back = s:option(DummyValue, "_overview", translate("overview"))
 back.value = ""
@@ -25,12 +26,12 @@ back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "traff
 name = s:option(Value, "_name", translate("name")..translate("cbi_optional"))
 name.rmempty = true
 
-iface = s:option(ListValue, "src", translate("firewall_rule_src"))
+iface = s:option(ListValue, "src", translate("fw_src"))
 iface.rmempty = true
 
-oface = s:option(ListValue, "dest", translate("firewall_rule_dest"))
-oface:value("")
-oface.optional = true
+oface = s:option(ListValue, "dest", translate("fw_dest"))
+oface:value("", translate("device", "device"))
+oface.rmempty = true
 
 luci.model.uci.cursor():foreach("firewall", "zone",
        function (section)