diff options
Diffstat (limited to 'lbu-config-html.lsp')
-rw-r--r-- | lbu-config-html.lsp | 52 |
1 files changed, 16 insertions, 36 deletions
diff --git a/lbu-config-html.lsp b/lbu-config-html.lsp index 22c1405..d9e1491 100644 --- a/lbu-config-html.lsp +++ b/lbu-config-html.lsp @@ -1,4 +1,6 @@ -<? local form = ... ?> +<? local form = ... +require("viewfunctions") +?> <? --[[ DEBUG INFORMATION io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") @@ -6,80 +8,58 @@ io.write(html.cfe_unpack(form)) io.write("</span>") --]] ?> -<? -function displayinfo(myform,tags,viewonly) - io.write("<DL>") - for k,v in pairs(tags) do - if (myform[v]) and (myform[v]["value"]) then - local val = myform[v] - io.write("\t<DT") - if (#val.errtxt > 0) then - val.class = "error" - io.write(" class='error'") - end - io.write(">" .. val.label .. "</DT>\n") - if (viewonly) then - io.write("\t\t<DD>" .. val.value .. "\n") - else - io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") - end - if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end - io.write("\t\t</DD>\n") - end - end - io.write("</DL>") -end -?> <H1>SYSTEM INFO</H1> +<DL> <? local myform = form.status local tags = { "status", "version", } displayinfo(myform,tags,"viewonly") ?> +</DL> <H1>CONFIG</H1> <form name="config" action="" method="POST"> <H2>Advanced config</H2> <H3>Storage media</H3> -<? +<DL> +<? local myform = form.config local tags = { "LBU_MEDIA", } displayinfo(myform,tags) ?> +</DL> <H3>Included list</H3> +<DL> <? local tags = { "lbu_included","cmd_delete_included", "item_add_included", "cmd_add_included", } displayinfo(myform,tags) ?> +</DL> <H3>Excluded list</H3> +<DL> <? local tags = { "lbu_excluded","cmd_delete_excluded", "item_add_excluded", "cmd_add_excluded", } displayinfo(myform,tags) ?> +</DL> <H3>Security/Encryption</H3> +<DL> <? local tags = { "ENCRYPTION", "DEFAULT_CIPHER", "PASSWORD", } displayinfo(myform,tags) ?> +</DL> <H2>Save and apply above settings</H2> +<DL> <? local tags = { "config_submit" } displayinfo(myform,tags) ?> - +</DL> </form> - -<? ---[[ DEBUG INFORMATION -io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>") -io.write(html.cfe_unpack(form)) -io.write("</span>") ---]] -?> |