luci-mod-admin-full: offer "Cancel" button in iface add dialog

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9bdd097f53)
This commit is contained in:
Jo-Philipp Wich 2018-07-18 10:11:45 +02:00
parent 94b6aa2a8e
commit c0612e8208

View file

@ -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: <code>A-Z</code>, <code>a-z</code>, " ..
"<code>0-9</code> and <code>_</code>"