6a81d7154eed676e949f349fa44fabd7a048fed9
[project/luci.git] / modules / luci-mod-admin-full / luasrc / model / cbi / admin_system / buttons.lua
1 -- Copyright 2008 Steven Barth <steven@midlink.org>
2 -- Licensed to the public under the Apache License 2.0.
3
4 m = Map("system", translate("Buttons"),
5         translate("This page allows the configuration of custom button actions"))
6
7 s = m:section(TypedSection, "button", "")
8 s.anonymous = true
9 s.addremove = true
10
11 s:option(Value, "button", translate("Name"))
12
13 act = s:option(ListValue, "action",
14         translate("Action"),
15         translate("Specifies the button state to handle"))
16
17 act:value("released")
18
19 s:option(Value, "handler",
20         translate("Handler"),
21         translate("Path to executable which handles the button event"))
22
23 min = s:option(Value, "min", translate("Minimum hold time"))
24 min.rmempty = true
25
26 max = s:option(Value, "max", translate("Maximum hold time"))
27 max.rmempty = true