diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-07-04 14:39:44 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-07-04 14:39:44 +0000 |
commit | c282eb4dc153e437931e8bcc08c4d2dbef1d2261 (patch) | |
tree | 11d967001d3c236d41e268e63410b7a81f17ba70 | |
parent | ed164e591fcd52f77c66f629ff00c216e4278f86 (diff) | |
download | acf-core-c282eb4dc153e437931e8bcc08c4d2dbef1d2261.tar.bz2 acf-core-c282eb4dc153e437931e8bcc08c4d2dbef1d2261.tar.xz |
Added generic form lsp file. A few updates to library functions and lsp files.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1275 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | app/Makefile | 1 | ||||
-rw-r--r-- | app/expert-html.lsp | 2 | ||||
-rw-r--r-- | app/form-html.lsp | 9 | ||||
-rw-r--r-- | lib/controllerfunctions.lua | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/app/Makefile b/app/Makefile index 32b1654..b840e75 100644 --- a/app/Makefile +++ b/app/Makefile @@ -32,6 +32,7 @@ APP_DIST= \ filedetails-html.lsp\ expert-html.lsp\ debug-html.lsp\ + form-html.lsp\ EXTRA_DIST=README Makefile DISTFILES=$(APP_DIST) $(EXTRA_DIST) diff --git a/app/expert-html.lsp b/app/expert-html.lsp index 3639f11..49fffd4 100644 --- a/app/expert-html.lsp +++ b/app/expert-html.lsp @@ -11,6 +11,6 @@ local func = haserl.loadfile(page_info.viewfile:gsub(pattern..".*$", "/") .. "fi func(form, viewlibrary, page_info, session) ?> -<? if viewlibrary and viewlibrary.dispatch_component then +<? if viewlibrary and viewlibrary.dispatch_component and session.permissions[page_info.controller].startstop then viewlibrary.dispatch_component("startstop") end ?> diff --git a/app/form-html.lsp b/app/form-html.lsp new file mode 100644 index 0000000..451123a --- /dev/null +++ b/app/form-html.lsp @@ -0,0 +1,9 @@ +<? local form, viewlibrary, page_info = ... +require("viewfunctions") +?> + +<H1><?= form.label ?></H1> +<? + form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action + displayform(form) +?> diff --git a/lib/controllerfunctions.lua b/lib/controllerfunctions.lua index 298eac6..ec62fee 100644 --- a/lib/controllerfunctions.lua +++ b/lib/controllerfunctions.lua @@ -21,7 +21,7 @@ function handle_form(self, getFunction, setFunction, clientdata, option, label, end end form = setFunction(form) - if not form.errtxt then + if not form.errtxt and descr then form.descr = descr end form = self:redirect_to_referrer(form) |