<%+header%> <% local disp = require "luci.dispatcher" -- local request = disp.context.path local request = disp.context.request local mtkwifi = require("mtkwifi") --local devname = string.match(request[5], "(mt.+)%.") local devname = request[5] local devs = mtkwifi.get_all_devs() local dev = {} local vif = {} local vifidx for _,v in ipairs(devs) do if v.devname == devname then dev = v end end local vifname = request[6] or dev.apcli.vifname assert(vifname) vif = dev and dev.vifs[vifname] or nil vifidx = vif and vif.vifidx or nil --print(devs, dev, dev.apcli, devname, vifname) local cfgs = mtkwifi.load_profile(dev.profile) %>
" enctype="multipart/form-data" onreset="return cbi_validate_reset(this);" onsubmit="return validate_all() && cbi_validate_form(this, '<%:Some fields are invalid, cannot save values!%>')" autocomplete="off">

<%:ApCli Configurations%> - <%=vifname and devname.."@"..vifname or devname%> <%local diff = mtkwifi.diff_profile(dev.profile)%> <%if next(diff) ~= nil then%> ( '"><%:Click here%> <%:to apply changes%>) <%end%>

<%:ApCli Available Wireless Networks%>

<%:ApCli Connection Configurations%>

style="display:none;" <% end %> > style="display:none;"<% end %>> style="display:none;"<% end %>> style="display:none;" <% end %>> style="display:none" <% end %> > style="display: none;"<% end %>>
<%:ApClient Mode%> checked="checked"<% end %> onclick="toggle_apcli(true)"/><%:Enable%> checked="checked"<% end %> onclick="toggle_apcli(false)"/><%:Disable%>
<%:MAC Repeater Mode%> checked="checked"<% end %>/><%:Enable%> checked="checked"<% end %>/><%:Disable%>
<%:Root AP SSID%> "/>
<%:Root AP Channel%>
<%:Root AP Authentication Mode%>
<%:Root AP Encryption%>
<%:Root AP WPA Key%> "/>
<%:ApCli MFPC%> checked="checked" <% end %> <% if cfgs.ApCliAuthMode == "WPA3PSK" then %> disabled="disabled" <% end %> type="checkbox">
<%:ApCli MFPR%> checked="checked" <% end %> <% if cfgs.ApCliAuthMode == "WPA3PSK" then %> disabled="disabled" <% end %> type="checkbox">
<%:ApCli MFPSHA256%> checked="checked" <% end %> <% if cfgs.ApCliAuthMode == "WPA3PSK" then %> disabled="disabled" <% end %> type="checkbox">
<%:Root AP Encryption%>
<%:WEP Default Key%>
<%:Root AP WEP Key%> 1 " maxlength="26"/>
<%:WEP Key Type%> 1
<%:Root AP WEP Key%> 2 " maxlength="26"/>
<%:WEP Key Type%> 2
<%:Root AP WEP Key%> 3 " maxlength="26"/>
<%:WEP Key Type%> 3
<%:Root AP WEP Key%> 4 " maxlength="26"/>
<%:WEP Key Type%> 4
<%+footer%>