From d7dd7e74c68f715655c5c4e497b9f82ef336202e Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 25 Sep 2008 18:35:42 +0000 Subject: Moved cfe into mvc.lua and removed cfe.lua. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1518 ab2d0c66-481e-0410-8bed-d214d4d58bed --- www/cgi-bin/mvc.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'www/cgi-bin/mvc.lua') 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 -- cgit v1.2.3