diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-07-18 10:11:45 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-07-18 12:05:05 +0200 |
commit | 9bdd097f53160a9d7c7ee536ee61f5282eaa7955 (patch) | |
tree | 3e05a2841f75abf9dde1ff266b760ce57db7fb90 /modules | |
parent | 60e7ea2fc8363960861a82f1e65ca4a7a1d60bfe (diff) |
luci-mod-admin-full: offer "Cancel" button in iface add dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/iface_add.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 e48e3b4bdf..ca66e9f365 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: <code>A-Z</code>, <code>a-z</code>, " .. "<code>0-9</code> and <code>_</code>" |