summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-splash/src
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-22 14:04:03 +0000
committerSteven Barth <steven@midlink.org>2008-05-22 14:04:03 +0000
commit6604399aa8f35d33c53a5e5a1fea765f401aef5e (patch)
treeed818d630634a98a8996a1ba6d10e63bbea17c39 /applications/luci-splash/src
parentf738eb786e3d30028310c7bcc447e7e7b63767e0 (diff)
Merge branch 'menu'
Diffstat (limited to 'applications/luci-splash/src')
-rw-r--r--applications/luci-splash/src/controller/splash/splash.lua13
-rw-r--r--applications/luci-splash/src/model/cbi/splash/splash.lua (renamed from applications/luci-splash/src/model/cbi/admin_services/splash.lua)0
-rw-r--r--applications/luci-splash/src/model/menu/50luci-splash.lua2
3 files changed, 12 insertions, 3 deletions
diff --git a/applications/luci-splash/src/controller/splash/splash.lua b/applications/luci-splash/src/controller/splash/splash.lua
index 62088be52d..7d837cd34d 100644
--- a/applications/luci-splash/src/controller/splash/splash.lua
+++ b/applications/luci-splash/src/controller/splash/splash.lua
@@ -1,5 +1,16 @@
module("ffluci.controller.splash.splash", package.seeall)
+function index()
+ local page = node("admin", "services", "splash")
+ page.target = cbi("splash/splash")
+ page.title = "Client-Splash"
+
+ node("splash", "splash", "activate").target = action_activate
+ node("splash", "splash", "allowed").target = action_allowed
+ node("splash", "splash", "unknown").target = action_unknown
+ node("splash", "splash", "splash").target = template("splash_splash/splash")
+end
+
function action_activate()
local mac = ffluci.sys.net.ip4mac(ffluci.http.env.REMOTE_ADDR)
if mac and ffluci.http.formvalue("accept") then
@@ -10,7 +21,7 @@ function action_activate()
end
end
-function action_accepted()
+function action_allowed()
ffluci.http.redirect(ffluci.dispatcher.build_url())
end
diff --git a/applications/luci-splash/src/model/cbi/admin_services/splash.lua b/applications/luci-splash/src/model/cbi/splash/splash.lua
index fe4d2c3ee8..fe4d2c3ee8 100644
--- a/applications/luci-splash/src/model/cbi/admin_services/splash.lua
+++ b/applications/luci-splash/src/model/cbi/splash/splash.lua
diff --git a/applications/luci-splash/src/model/menu/50luci-splash.lua b/applications/luci-splash/src/model/menu/50luci-splash.lua
deleted file mode 100644
index 99f7caa52b..0000000000
--- a/applications/luci-splash/src/model/menu/50luci-splash.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-sel("admin", "services")
-act("splash", "Client-Splash") \ No newline at end of file