summaryrefslogtreecommitdiffstats
path: root/tinydns-edit-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
committerTed Trask <ttrask01@yahoo.com>2008-06-18 20:07:55 +0000
commit151f597ce365349add8c21fff63902be0084645f (patch)
treefdfa505adeaea2d4bb0e8c604a0439b211016111 /tinydns-edit-html.lsp
parentf0dcd211ed5fca855655d8b60b588b1d193e92fd (diff)
downloadacf-tinydns-151f597ce365349add8c21fff63902be0084645f.tar.bz2
acf-tinydns-151f597ce365349add8c21fff63902be0084645f.tar.xz
Rewrite of tinydns to simplify code and use new cfe model.
Added js to filter records. git-svn-id: svn://svn.alpinelinux.org/acf/tinydns/trunk@1219 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-edit-html.lsp')
-rw-r--r--tinydns-edit-html.lsp62
1 files changed, 23 insertions, 39 deletions
diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp
index ba9a696..93887dd 100644
--- a/tinydns-edit-html.lsp
+++ b/tinydns-edit-html.lsp
@@ -1,6 +1,5 @@
-<? local form = ...
-require("viewfunctions")
-?>
+<? local form, viewlibrary = ... ?>
+<? require("viewfunctions") ?>
<?
--[[ DEBUG INFORMATION
io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
@@ -9,50 +8,35 @@ io.write("</span>")
--]]
?>
-<H1>SYSTEM INFO</H1>
-<DL>
-<?
-local myform = form.status
-local tags = { "status", "version", "autostart", }
-displayinfo(myform,tags,"viewonly")
-?>
-</DL>
-
-<form name="myform" action="" method="POST">
-<h1>CONFIGURATION</h1>
-<H2>Expert config</H2>
-<h3>File details</h3>
+<H1>CONFIGURATION</H1>
+<H2>EXPERT CONFIGURATION</H2>
+<H3>FILE DETAILS</H3>
<DL>
<?
-local myform = form.file
-local tags = { "filename", "filesize", "mtime", "sumerrors", }
-displayinfo(myform,tags,"viewonly")
+displayitem(form.value.filename)
+displayitem(form.value.filesize)
+displayitem(form.value.mtime)
?>
</DL>
<H3>FILE CONTENT</H3>
-<?
-local myform = form.file
-io.write('<input type="hidden" value="' .. myform.filename.value .. '" name="name">')
-io.write(html.form[myform.filecontent.type](myform.filecontent))
-?>
+<? if form.descr then ?><P CLASS='descr'><?= string.gsub(form.descr, "\n", "<BR>") ?></P><? end ?>
+<? if form.errtxt then ?><P CLASS='error'><?= string.gsub(form.errtxt, "\n", "<BR>") ?></P><? end ?>
+<form action="" method="POST">
+<input type="hidden" name="filename" value="<?= form.value.filename.value ?>">
+<textarea name="filecontent">
+<?= form.value.filecontent.value ?>
+</textarea>
+<? if form.value.filecontent.errtxt then ?><P CLASS='error'><?= string.gsub(form.value.filecontent.errtxt, "\n", "<BR>") ?></P><? end ?>
<H2>SAVE AND APPLY ABOVE SETTINGS</H2>
-<DL>
-<?
-local tags = { "cmddelete", "cmdsave", }
-displayinfo(myform,tags)
-?>
-</DL>
+<DL><DT>Save/Apply above settings</DT><DD><input class="submit" type="submit" name="<?= form.option ?>" value="Save"></DD></DL>
+</form>
<?
--- Management buttons
-local myform = form.management
-local tags = { "start", "stop", "restart" }
-if (myform) then
- io.write("<H1>MANAGEMENT</H1>\n<DL>")
- displaymanagement(myform,tags)
- io.write("</DL>")
-end
+--[[ 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>")
+--]]
?>
-</form>