From dff2e5d4e7b7ef808d146ea64653701021a27ab2 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Tue, 8 Apr 2008 15:13:05 +0000 Subject: Cleaning up code. git-svn-id: svn://svn.alpinelinux.org/acf/openntpd/trunk@959 ab2d0c66-481e-0410-8bed-d214d4d58bed --- openntpd-config-html.lsp | 81 +++++++----------------------------------------- 1 file changed, 12 insertions(+), 69 deletions(-) (limited to 'openntpd-config-html.lsp') diff --git a/openntpd-config-html.lsp b/openntpd-config-html.lsp index 77a38dc..87f2134 100644 --- a/openntpd-config-html.lsp +++ b/openntpd-config-html.lsp @@ -1,5 +1,6 @@ - - + DEBUGGING

DEBUG INFO: CFE

") @@ -8,40 +9,6 @@ io.write("
") --]] ?> - 0) then - val.class = "error" - io.write(" class='error'") - end - io.write(">" .. val.label .. "") - io.write("\n\t\t
") - if (viewtype == "viewonly") then - io.write(val.value) - elseif (val.type == "radio") and (type(val.option) == "table") and (#val.option > 0) then - io.write("") - for k1,v1 in pairs(val.option) do - io.write(tostring(v1.label) .. ":") - io.write("") - end - io.write("") - else - io.write(html.form[val.type](val)) - end - if (val.descr) and (#val.descr > 0) then io.write("\n\t\t

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

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

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

") end - io.write("\n\t\t
\n") - end - end -end -?> -

SYSTEM INFO

-

CONFIGURATION

Advanced config

@@ -92,37 +58,14 @@ displayinfo(myform,tags) ?> -
- -') - io.write('

MANAGEMENT

') - io.write('
') - io.write('
' .. cmdform[tags[1]]["label"] .. '
') - io.write('
') - for k,v in pairs(tags) do - if (cmdform[v]) then - io.write(html.form[cmdform[v].type](cmdform[v])) - end - end - io.write('
') - - if (cmdresult) and (cmdresult.action) and (#cmdresult.action.descr > 0) then - io.write('
' .. cmdresult.label .. '
') - io.write('
' .. cmdresult.action.descr .. '
') - end - io.write('
') -end ?> - DEBUGGING

DEBUG INFO: CFE

") -io.write(html.cfe_unpack(form)) -io.write("
") ---]] +-- Management buttons +local myform = form.management +local tags = { "start", "stop", "restart" } +if (myform) then + io.write("

MANAGEMENT

\n
") + displaymanagement(myform,tags) + io.write("
") +end ?> + -- cgit v1.2.3