summaryrefslogtreecommitdiffstats
path: root/www/cgi-bin/mvc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'www/cgi-bin/mvc.lua')
-rwxr-xr-xwww/cgi-bin/mvc.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/www/cgi-bin/mvc.lua b/www/cgi-bin/mvc.lua
index 86a1bb4..aef3547 100755
--- a/www/cgi-bin/mvc.lua
+++ b/www/cgi-bin/mvc.lua
@@ -317,3 +317,17 @@ exception_handler = function (self, message )
print (tostring(message))
end
end
+
+-- 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