From 1889fca8b509381c749d7e418e92cf809ec8d5ce Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Fri, 1 Feb 2008 13:41:30 +0000 Subject: Many changes (mostly to use cfe's when sending/receiving things from model/controller/view). git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@676 ab2d0c66-481e-0410-8bed-d214d4d58bed --- syslog-config-html.lsp | 66 ++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 29 deletions(-) (limited to 'syslog-config-html.lsp') diff --git a/syslog-config-html.lsp b/syslog-config-html.lsp index dc8fe5a..cce5f25 100644 --- a/syslog-config-html.lsp +++ b/syslog-config-html.lsp @@ -7,26 +7,25 @@ io.write("") --]] ?> -

SYSTEM INFO

-
- 0) then io.write(" class='error'") end - io.write(">" .. val.label .. "\n") - - io.write("\t\t
" .. val.value .. "\n") - if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. val.descr .. "

\n") end - if (#val.errtxt > 0) then io.write("\t\t

" .. val.errtxt .. "

\n") end - io.write("\t\t
\n") - -end ?> -
+") + for k,v in pairs(tags) do + if (myform[v]) then + local val = myform[v] + io.write("\t 0) then io.write(" class='error'") end + io.write(">" .. val.label .. "\n") + io.write("\t\t
" .. val.value .. "\n") + if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. string.gsub(val.descr, "\n", "
") .. "

\n") end + if (#val.errtxt > 0) then io.write("\t\t

" .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end + io.write("\t\t
\n") + end + end + io.write("") +end +?> ") @@ -38,8 +37,8 @@ function configform(myform,tags) io.write(">" .. val.label .. "\n") io.write("\t\t
" .. html.form[val.type](val) .. "\n") - if (val.descr) and (#val.descr > 0) then io.write("\t\t
" .. val.descr .. "
\n") end - if (#val.errtxt > 0) then io.write("\t\t

" .. val.errtxt .. "

\n") end + if (val.descr) and (#val.descr > 0) then io.write("\t\t

" .. string.gsub(val.descr, "\n", "
") .. "

\n") end + if (#val.errtxt > 0) then io.write("\t\t

" .. string.gsub(val.errtxt, "\n", "
") .. "

\n") end io.write("\t\t
\n") end end @@ -47,12 +46,19 @@ function configform(myform,tags) end ?> +

SYSTEM INFO

+ +

CONFIGURATION

" method="POST"> - +

GUIDED CONFIGURATION

REMOTE LOGGING

+

ADVANCED CONFIGURATION

GENERAL

+

SAVE AND APPLY ABOVE SETTINGS

MANAGEMENT

-
+
- - + +
@@ -114,7 +122,7 @@ if (myform) and (myform[tags[1]]) then DEBUGGING

DEBUG INFO: CFE

") io.write(html.cfe_unpack(form)) io.write("
") -- cgit v1.2.3