From 997b4dcd33463841aa8f1ca6d59dea7bc9d38ae9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 2 Jul 2008 15:56:04 +0000 Subject: Modified core to create model and controller function libraries and some common html views. Moved cfe to a library. Modified redirect_to_referrer function - may break some pages. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1267 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/cfe.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/cfe.lua (limited to 'lib/cfe.lua') 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 -- cgit v1.2.3