From f6ffc3d739ef48c3186b3313e2480c8787f42fcd Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 15 Jul 2018 13:14:24 +0200 Subject: [PATCH] luci-mod-admin-full: fix wifi add and scan actions Due to conversion to CBI, the inline forms are now nested and thus do not work anymore. Signed-off-by: Jo-Philipp Wich --- .../model/cbi/admin_network/wifi_overview.lua | 15 +++------------ .../view/admin_network/wifi_overview_status.htm | 8 ++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua index dda31fb1e..dcd03cb0f 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi_overview.lua @@ -78,18 +78,9 @@ local tpl_radio = tpl.Template(nil, [[
- - -
- - - -
-
- - - -
+ + +
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview_status.htm index 9730bc2c9..cc6db1721 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_overview_status.htm @@ -26,6 +26,14 @@ { token: '<%=token%>' }, XHR.run); } + function wifi_action(ev, action) { + var i = ev.target, + e = i.getAttribute('data-radio'); + + i.parentNode.appendChild(E('input', { type: 'hidden', name: 'device', value: e })); + i.form.action = '<%=url('admin/network/wireless_')%>' + action; + } + var networks = [ ]; document.querySelectorAll('[data-network]').forEach(function(n) { -- 2.25.1