X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-mod-admin-full%2Fluasrc%2Fview%2Fadmin_network%2Fiface_overview.htm;h=9a77f89106937b0819c07e6c3bd1d37cb16a320a;hp=4cdf2df9589301718b921c81819b67d2cbc7b5a4;hb=8bb749ecc3b5f7f836f744f0056e90ac78522926;hpb=6b3f804956e50b3e3afc96bd866b089d4523c6e2
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm
index 4cdf2df95..9a77f8910 100644
--- a/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm
+++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/iface_overview.htm
@@ -49,7 +49,7 @@
s.innerHTML = '<%:Waiting for changes to be applied...%>';
}
- XHR.get('<%=url('admin/network')%>/iface_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, null,
+ (new XHR()).post('<%=url('admin/network')%>/iface_' + (reconnect ? 'reconnect' : 'shutdown') + '/' + id, { token: '<%=token%>' },
function(x)
{
if (s)
@@ -66,6 +66,16 @@
);
}
+ function iface_delete(id) {
+ if (!confirm('<%:Really delete this interface? The deletion cannot be undone!\nYou might lose access to this device if you are connected via this interface.%>'))
+ return;
+
+ (new XHR()).post('<%=url('admin/network/iface_delete')%>/' + id, { token: '<%=token%>' },
+ function(x) {
+ location.href = '<%=url('admin/network/network')%>';
+ }
+ );
+ }
var iwxhr = new XHR();
var wifidevs = <%=luci.http.write_json(netdevs)%>;
@@ -240,7 +250,7 @@
'" title="<%:Edit this interface%>" value="<%:Edit%>" id="<%=net[1]%>-ifc-edit" />
- '" title="<%:Delete this interface%>" value="<%:Delete%>" />
+
<% end %>