diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-05-13 20:02:56 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-05-13 20:02:56 +0000 |
commit | 4b82433c8a6149f14e24bdca209bfcf54cedbaa3 (patch) | |
tree | ac5cb1d808f96ad7cded6c9ae0a73df9bd3989d5 /syslog-startstop-html.lsp | |
parent | 4d05e67ca4d9e29cea6fc3390a700b237a20d31e (diff) | |
download | acf-alpine-baselayout-4b82433c8a6149f14e24bdca209bfcf54cedbaa3.tar.bz2 acf-alpine-baselayout-4b82433c8a6149f14e24bdca209bfcf54cedbaa3.tar.xz |
Rewrote syslog to use components and remove view-specific code from controller.
Also made sure not to write to conf file unless all variables pass validation.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1116 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'syslog-startstop-html.lsp')
-rw-r--r-- | syslog-startstop-html.lsp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/syslog-startstop-html.lsp b/syslog-startstop-html.lsp new file mode 100644 index 0000000..f3f7013 --- /dev/null +++ b/syslog-startstop-html.lsp @@ -0,0 +1,26 @@ +<? local data = ... ?> +<? --[[ +io.write(html.cfe_unpack(data)) +--]] ?> + +<H1>MANAGEMENT</H1> +<DL> +<form action="startstop" method="POST"> +<DT>Program control-panel</DT> +<DD> +<input class="submit" type="submit" name="action" value="Start" <? if data.value.status.value== "Enabled" then io.write("disabled") end ?>> +<input class="submit" type="submit" name="action" value="Stop" <? if data.value.status.value== "Disabled" then io.write("disabled") end ?>> +<input class="submit" type="submit" name="action" value="Restart" <? if data.value.status.value== "Disabled" then io.write("disabled") end ?>> +</DD> +</form> + +<? if data.value.result then ?> +<DT>Previous action result</DT> +<DD> +<? if data.value.result.descr then ?> +<P CLASS='descr'><?= string.gsub(data.value.result.descr, "\n", "<BR>") ?></P> +<? end if data.value.result.errtxt then ?> +<P CLASS='error'><?= string.gsub(data.value.result.errtxt, "\n", "<BR>") ?></P> +<? end end ?> +</DD> +</DL> |