diff options
Diffstat (limited to 'fetchmail-expert-html.lsp')
-rw-r--r-- | fetchmail-expert-html.lsp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/fetchmail-expert-html.lsp b/fetchmail-expert-html.lsp index 0a36abb..597e162 100644 --- a/fetchmail-expert-html.lsp +++ b/fetchmail-expert-html.lsp @@ -49,7 +49,7 @@ end <H1>SYSTEM INFO</H1> <? local myform = form.status -local tags = { "status", "version", } +local tags = { "status", "version", "autostart", } informationform(myform,tags) ?> @@ -77,32 +77,30 @@ configform(myform,tags) ?> </form> - -<? +<? -- MANAGEMENT BUTTONS local cmdform = form.management +local cmdresult = form.cmdmanagement local tags = { "start", "stop", "restart" } if (cmdform) and (cmdform[tags[1]]) then -?> - <form name="management" action="" method="POST"> - <H1>MANAGEMENT</H1> - <dl> - <dt><?= cmdform[tags[1]]["label"] ?></dt> - <dd> - <? for k,v in pairs(tags) do ?> - <? if (cmdform[v]) then ?> - <? io.write(html.form[cmdform[v].type](cmdform[v])) ?> - <? end ?> - <? end ?> - </dd> - <? if (form.cmdmanagement) and (#form.cmdmanagement.descr > 0) then ?> - <dt>Previous action result</dt> - <dd><pre><?= form.cmdmanagement.descr ?></pre></dd> - <? end ?> - </dl> - </form> + io.write('<form name="management" action="" method="POST">') + io.write('<H1>MANAGEMENT</H1>') + io.write('<dl>') + io.write('<dt>' .. cmdform[tags[1]]["label"] .. '</dt>') + io.write('<dd>') + for k,v in pairs(tags) do + if (cmdform[v]) then + io.write(html.form[cmdform[v].type](cmdform[v])) + end + end + io.write('</dd>') -<? end ?> + if (cmdresult) and (cmdresult.action) and (#cmdresult.action.descr > 0) then + io.write('<dt>' .. cmdresult.label .. '</dt>') + io.write('<dd><pre>' .. cmdresult.action.descr .. '</pre></dd>') + end + io.write('</dl></form>') +end ?> <? --[[ DEBUG INFORMATION |