summaryrefslogtreecommitdiffstats
path: root/lib/cfe.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cfe.lua')
-rw-r--r--lib/cfe.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/cfe.lua b/lib/cfe.lua
new file mode 100644
index 0000000..34a249d
--- /dev/null
+++ b/lib/cfe.lua
@@ -0,0 +1,15 @@
+module(..., package.seeall)
+
+-- create a Configuration Framework Entity (cfe)
+-- returns a table with at least "value", "type", and "label"
+cfe = function ( optiontable )
+ optiontable = optiontable or {}
+ me = { value="",
+ type="text",
+ label="" }
+ for key,value in pairs(optiontable) do
+ me[key] = value
+ end
+ return me
+end
+_G.cfe = cfe