From 63e8c6b82c980876ddc522174970e5b1b9014b06 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Tue, 8 Apr 2008 12:35:04 +0000 Subject: Cleaning up the code. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@954 ab2d0c66-481e-0410-8bed-d214d4d58bed --- tinydns-edit-html.lsp | 80 ++++++++------------------------------------------- 1 file changed, 12 insertions(+), 68 deletions(-) (limited to 'tinydns-edit-html.lsp') diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp index e5bb6ba..08dee18 100644 --- a/tinydns-edit-html.lsp +++ b/tinydns-edit-html.lsp @@ -1,4 +1,6 @@ - + DEBUGGING

DEBUG INFO: CFE

") @@ -6,39 +8,6 @@ io.write(html.cfe_unpack(form)) 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

@@ -49,7 +18,6 @@ displayinfo(myform,tags,"viewonly") ?>
-

CONFIGURATION

Expert config

@@ -77,38 +45,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