From 52a457602fc2d7d106ddfa0a686ee8a07c979875 Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Tue, 8 Apr 2008 15:11:02 +0000 Subject: Cleaning up code. git-svn-id: svn://svn.alpinelinux.org/acf/fetchmail/trunk@955 ab2d0c66-481e-0410-8bed-d214d4d58bed --- fetchmail-expert-html.lsp | 91 +++++++++-------------------------------------- 1 file changed, 17 insertions(+), 74 deletions(-) (limited to 'fetchmail-expert-html.lsp') diff --git a/fetchmail-expert-html.lsp b/fetchmail-expert-html.lsp index 597e162..e46fdb2 100644 --- a/fetchmail-expert-html.lsp +++ b/fetchmail-expert-html.lsp @@ -1,4 +1,6 @@ - + DEBUGGING

DEBUG INFO: CFE

") @@ -6,52 +8,15 @@ io.write(html.cfe_unpack(form)) io.write("
") --]] ?> -") - 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 -?> -") - 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
" .. html.form[val.type](val) .. "\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 -?> -

SYSTEM INFO

+
+

CONFIGURATION

@@ -62,7 +27,7 @@ informationform(myform,tags)

FILE DETAILS

FILE CONTENT

@@ -73,39 +38,17 @@ io.write(html.form[form.config.filecontent.type](form.config.filecontent))

SAVE AND APPLY ABOVE SETTINGS

- - -') - 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