From d458bf17dcd0a518c77f504927f31ba626d09bbe Mon Sep 17 00:00:00 2001 From: fujr Date: Fri, 1 Nov 2024 01:54:46 +0800 Subject: [PATCH] fix style for lua luci --- .../luasrc/model/cbi/qmodem/modem_ttl.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/luci/luci-app-qmodem-ttl/luasrc/model/cbi/qmodem/modem_ttl.lua b/luci/luci-app-qmodem-ttl/luasrc/model/cbi/qmodem/modem_ttl.lua index e81192a..12f0003 100644 --- a/luci/luci-app-qmodem-ttl/luasrc/model/cbi/qmodem/modem_ttl.lua +++ b/luci/luci-app-qmodem-ttl/luasrc/model/cbi/qmodem/modem_ttl.lua @@ -9,10 +9,10 @@ ttl.default = 64 ttl.datatype = "uinteger" o = s:option(Value, "ifname", translate("Interface")) -o.rmempty = ture -o.template = "cbi/network_netlist" -o.widget = "optional" -o.nocreate = true -o.unspecified = true +uci:foreach("network", "interface", function(s) + if s[".name"] ~= "loopback" and s[".name"] ~= "lan" then + o:value(s[".name"]) + end +end) return m