luci-mod-freifunk: dispatch SimpleForm model using the form() action
[project/luci.git] / modules / luci-mod-freifunk / luasrc / controller / freifunk / freifunk.lua
index bb58a3f..adad750 100644 (file)
@@ -1,16 +1,5 @@
---[[
-LuCI - Lua Configuration Interface
-
-Copyright 2008 Steven Barth <steven@midlink.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-]]--
+-- Copyright 2008 Steven Barth <steven@midlink.org>
+-- Licensed to the public under the Apache License 2.0.
 
 module("luci.controller.freifunk.freifunk", package.seeall)
 
@@ -81,14 +70,14 @@ function index()
        page.target = cbi("freifunk/basics")
        page.title  = _("Basic Settings")
        page.order  = 5
-       
+
        page        = node("admin", "freifunk", "basics", "profile")
        page.target = cbi("freifunk/profile")
        page.title  = _("Profile")
        page.order  = 10
 
        page        = node("admin", "freifunk", "basics", "profile_expert")
-       page.target = cbi("freifunk/profile_expert")
+       page.target = form("freifunk/profile_expert")
        page.title  = _("Profile (Expert)")
        page.order  = 20
 
@@ -113,7 +102,7 @@ function zeroes()
        local zeroes = string.rep(string.char(0), 8192)
        local cnt = 0
        local lim = 1024 * 1024 * 1024
-       
+
        http.prepare_content("application/x-many-zeroes")
 
        while cnt < lim do
@@ -199,7 +188,6 @@ function jsonstatus()
        root.network = {}
        root.wireless = {devices = {}, interfaces = {}, status = {}}
        local wifs = root.wireless.interfaces
-       local netdata = luci.sys.net.deviceinfo() or {}
 
        for _, vif in ipairs(ffwifs) do
                root.network[vif] = cursor:get_all("network", vif)