X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-firewall%2Fluasrc%2Fmodel%2Fcbi%2Ffirewall%2Frule-details.lua;h=1c838888f10e282da9c99191b99b61f74f686233;hp=0cb30b5cda46fca1975cb28804e6441d41726601;hb=c1eba6a046dae39558fe96a6e1e7bbe6291e091e;hpb=41d2b33087da393453c45f5d923d690c88ee5474 diff --git a/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua b/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua index 0cb30b5cd..1c838888f 100644 --- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua +++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/rule-details.lua @@ -99,7 +99,7 @@ elseif rule_type == "redirect" then o = s:option(Value, "src_ip", translate("Source IP address")) o.rmempty = true - o.datatype = "neg(ipaddr)" + o.datatype = "neg(ipmask4)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) @@ -123,7 +123,7 @@ elseif rule_type == "redirect" then o = s:option(Value, "dest_ip", translate("Destination IP address")) - o.datatype = "neg(ip4addr)" + o.datatype = "neg(ipmask4)" luci.sys.net.ipv4_hints(function(ip, name) o:value(ip, "%s (%s)" %{ ip, name }) @@ -269,7 +269,7 @@ else o = s:option(Value, "src_ip", translate("Source address")) - o.datatype = "neg(ipaddr)" + o.datatype = "neg(ipmask)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) @@ -290,7 +290,7 @@ else o = s:option(Value, "dest_ip", translate("Destination address")) - o.datatype = "neg(ipaddr)" + o.datatype = "neg(ipmask)" o.placeholder = translate("any") luci.sys.net.ipv4_hints(function(ip, name) @@ -316,4 +316,34 @@ else translate("Passes additional arguments to iptables. Use with care!")) end +o = s:option(MultiValue, "weekdays", translate("Week Days")) +o.oneline = true +o.widget = "checkbox" +o:value("Sun", translate("Sunday")) +o:value("Mon", translate("Monday")) +o:value("Tue", translate("Tuesday")) +o:value("Wed", translate("Wednesday")) +o:value("Thu", translate("Thursday")) +o:value("Fri", translate("Friday")) +o:value("Sat", translate("Saturday")) + +o = s:option(MultiValue, "monthdays", translate("Month Days")) +o.oneline = true +o.widget = "checkbox" +for i = 1,31 do + o:value(translate(i)) +end + +o = s:option(Value, "start_time", translate("Start Time (hh:mm:ss)")) +o.datatype = "timehhmmss" +o = s:option(Value, "stop_time", translate("Stop Time (hh:mm:ss)")) +o.datatype = "timehhmmss" +o = s:option(Value, "start_date", translate("Start Date (yyyy-mm-dd)")) +o.datatype = "dateyyyymmdd" +o = s:option(Value, "stop_date", translate("Stop Date (yyyy-mm-dd)")) +o.datatype = "dateyyyymmdd" + +o = s:option(Flag, "utc_time", translate("Time in UTC")) +o.default = o.disabled + return m