NIU: Minor fixes
[project/luci.git] / modules / niu / luasrc / model / cbi / niu / wireless / apdevice.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2009 Steven Barth <steven@midlink.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14 local niulib = require "luci.niulib"
15
16 m = Map("wireless", "Configure Private Access Point")
17 s = m:section(NamedSection, "ap", "interface", translate("Wireless Radio Device"),
18 translate(
19 "Select the wireless radio device that should be used to run the interface."..
20 " Note that wireless radios will not show up here if you already use"..
21 " them for other wireless services and are not capable of being used as"..
22 " an access point in parallel."))
23 s.anonymous = true
24 s.addremove = false
25
26 l = s:option(ListValue, "device", "Device providing Access Point")
27
28 for _, wifi in ipairs(niulib.wifi_get_available("ap")) do
29         l:value(wifi, "WLAN-Adapter (%s)" % wifi)
30 end
31 l:value("none", "Disable Private Access Point")
32
33 return m