luci-app-mwan3: remove configuration tab
[project/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / policy.lua
index e141d69..495b45e 100644 (file)
@@ -13,7 +13,7 @@ end
 
 function policyWarn() -- display status and warning messages at the top of the page
        if nameTooLong == 1 then
-               return "<font color=\"ff0000\"><strong>WARNING: Some policies have names exceeding the maximum of 15 characters!</strong></font>"
+               return "<font color=\"ff0000\"><strong>" .. translate("WARNING: Some policies have names exceeding the maximum of 15 characters!") .. "</strong></font>"
        else
                return ""
        end
@@ -30,7 +30,7 @@ policyCheck()
 
 
 m5 = Map("mwan3", translate("MWAN Policy Configuration"),
-       translate(policyWarn()))
+       policyWarn())
        m5:append(Template("mwan/config_css"))
 
 
@@ -42,14 +42,14 @@ mwan_policy = m5:section(TypedSection, "policy", translate("Policies"),
        "Policies may not share the same name as configured interfaces, members or rules"))
        mwan_policy.addremove = true
        mwan_policy.dynamic = false
-       mwan_policy.sectionhead = "Policy"
+       mwan_policy.sectionhead = translate("Policy")
        mwan_policy.sortable = true
        mwan_policy.template = "cbi/tblsection"
-       mwan_policy.extedit = ds.build_url("admin", "network", "mwan", "configuration", "policy", "%s")
+       mwan_policy.extedit = ds.build_url("admin", "network", "mwan", "policy", "%s")
        function mwan_policy.create(self, section)
                TypedSection.create(self, section)
                m5.uci:save("mwan3")
-               luci.http.redirect(ds.build_url("admin", "network", "mwan", "configuration", "policy", section))
+               luci.http.redirect(ds.build_url("admin", "network", "mwan", "policy", section))
        end
 
 
@@ -65,7 +65,6 @@ use_member = mwan_policy:option(DummyValue, "use_member", translate("Members ass
                else
                        return "&#8212;"
                end
-               
        end
 
 last_resort = mwan_policy:option(DummyValue, "last_resort", translate("Last resort"))
@@ -73,11 +72,11 @@ last_resort = mwan_policy:option(DummyValue, "last_resort", translate("Last reso
        function last_resort.cfgvalue(self, s)
                local action = self.map:get(s, "last_resort")
                if action == "blackhole" then
-                       return "blackhole (drop)"
+                       return translate("blackhole (drop)")
                elseif action == "default" then
-                       return "default (use main routing table)"
+                       return translate("default (use main routing table)")
                else
-                       return "unreachable (reject)"
+                       return translate("unreachable (reject)")
                end
        end