diff --git a/ffho/ffho-luci-ap-timer/luasrc/usr/lib/lua/luci/model/cbi/admin/ap-timer.lua b/ffho/ffho-luci-ap-timer/luasrc/usr/lib/lua/luci/model/cbi/admin/ap-timer.lua index 01753730d181f66a643a25b8537374bba0f27468..eed4ede9fa26266a5f380f6478037c07db228658 100644 --- a/ffho/ffho-luci-ap-timer/luasrc/usr/lib/lua/luci/model/cbi/admin/ap-timer.lua +++ b/ffho/ffho-luci-ap-timer/luasrc/usr/lib/lua/luci/model/cbi/admin/ap-timer.lua @@ -1,15 +1,20 @@ local uci = luci.model.uci.cursor() -m = Map('ap-timer', translate('AP Timer'), translate( - 'You can setup the AP Timer here')) -m.pageaction = false -m.template = "admin/expertmode" - if not uci:get('ap-timer','settings') then uci:section('ap-timer','ap-timer','settings') uci:save('ap-timer') end +if not uci:get('ap-timer','all') then + uci:section('ap-timer','day','all') + uci:save('ap-timer') +end + +m = Map('ap-timer', translate('AP Timer'), translate( + 'You can setup the AP Timer here')) +m.pageaction = false +m.template = "admin/expertmode" + s = m:section(NamedSection, 'settings', 'ap-timer', nil) s.addremove = false s.anonymous = true @@ -21,11 +26,6 @@ o = s:option(ListValue, 'type', translate('Type')) o.default = 'day' o:value('day', translate('Daily')) -if not uci:get('ap-timer','all') then - uci:section('ap-timer','day','all') - uci:save('ap-timer') -end - s = m:section(NamedSection, 'all', 'day', translate('Daily')) s.addremove = false s.anonymous = true