From 9bdd097f53160a9d7c7ee536ee61f5282eaa7955 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 18 Jul 2018 10:11:45 +0200 Subject: [PATCH] luci-mod-admin-full: offer "Cancel" button in iface add dialog Signed-off-by: Jo-Philipp Wich --- .../luasrc/model/cbi/admin_network/iface_add.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua index e48e3b4bd..ca66e9f36 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua @@ -10,6 +10,10 @@ m = SimpleForm("network", translate("Create Interface")) m.redirect = luci.dispatcher.build_url("admin/network/network") m.reset = false +function m.on_cancel() + luci.http.redirect(luci.dispatcher.build_url("admin/network/network")) +end + newnet = m:field(Value, "_netname", translate("Name of the new interface"), translate("The allowed characters are: A-Z, a-z, " .. "0-9 and _" -- 2.25.1