diff options
Diffstat (limited to 'www/cgi-bin/mvc.lua')
-rwxr-xr-x | www/cgi-bin/mvc.lua | 14 |
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 |