e450a62755252593567ee7038e88a9726a06994d
[project/luci.git] / applications / luci-p910nd / luasrc / model / cbi / p910nd.lua
1 --[[
2
3 LuCI p910nd
4 (c) 2008 Yanira <forum-2008@email.de>
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 ]]--
15
16 local uci = luci.model.uci.cursor_state()
17
18 m = Map("p910nd", translate("p910nd - Printer server"),
19 translatef("First you have to install the packages to get support for USB (kmod-usb-printer) or parallel port (kmod-lp)."))
20
21 s = m:section(TypedSection, "p910nd", translate("Settings"))
22 s.addremove = true
23 s.anonymous = true
24
25 s:option(Flag, "enabled", translate("enable"))
26
27 s:option(Value, "device", translate("Device")).rmempty = true
28
29 p = s:option(ListValue, "port", translate("Port"), translate("TCP listener port."))
30 p.rmempty = true
31 for i=0,9 do
32 p:value(i, 9100+i)
33 end
34
35 s:option(Flag, "bidirectional", translate("Bidirectional mode"))
36
37 return m