Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
end
end
- local curdev = luci.dispatcher.context.requestpath
- curdev = curdev[#curdev] ~= "bandwidth" and curdev[#curdev] or devices[1]
+ local curdev = luci.http.formvalue("dev") or devices[1]
-%>
<%+header%>
<ul class="cbi-tabmenu">
<% for _, dev in ipairs(devices) do %>
- <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
+ <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="?dev=<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
<% end %>
</ul>
end
end
- local curdev = luci.dispatcher.context.requestpath
- curdev = curdev[#curdev] ~= "wireless" and curdev[#curdev] or devices[1]
+ local curdev = luci.http.formvalue("dev") or devices[1]
-%>
<%+header%>
<ul class="cbi-tabmenu">
<% for _, dev in ipairs(devices) do %>
- <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
+ <li class="cbi-tab<%= dev == curdev and "" or "-disabled" %>"><a href="?dev=<%=pcdata(dev)%>"><%=pcdata(dev)%></a></li>
<% end %>
</ul>