diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-09-11 14:31:28 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-09-11 14:31:28 +0000 |
commit | 2764edeac9b4b54096f7a3c5eaa5b202e0c32f01 (patch) | |
tree | 97cef2733c05861c8e6b9062a2d5bafda694a7a3 /dansguardian-general-html.lsp | |
parent | 6d20b13cb8257b69654e508383eac0acaa135889 (diff) | |
download | acf-dansguardian-2764edeac9b4b54096f7a3c5eaa5b202e0c32f01.tar.bz2 acf-dansguardian-2764edeac9b4b54096f7a3c5eaa5b202e0c32f01.tar.xz |
Modified dansguardian. Changed advanced to listfiles and expert to listconfigfiles. Made general and edit be normal forms. Removed categories, which didn't work.
git-svn-id: svn://svn.alpinelinux.org/acf/dansguardian/trunk@1465 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'dansguardian-general-html.lsp')
-rw-r--r-- | dansguardian-general-html.lsp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/dansguardian-general-html.lsp b/dansguardian-general-html.lsp index 6c0ca60..e7bd1af 100644 --- a/dansguardian-general-html.lsp +++ b/dansguardian-general-html.lsp @@ -1,9 +1,6 @@ <% require("viewfunctions") local form, viewlibrary = ... - local service = form.service - local config = form.service.config - %> <% @@ -20,14 +17,23 @@ end %> <form action="" method="POST"> <h1>Configuration</h1> +<% + if form.descr then io.write('<P CLASS="descr">' .. string.gsub(form.descr, "\n", "<BR>") .. "</P>\n") end + if form.errtxt then io.write('<P CLASS="error">' .. string.gsub(form.errtxt, "\n", "<BR>") .. "</P>\n") end + for field,val in pairs(form.value) do + val.name = field + end +%> <h2>General</h2> <p> These parameters define the interface and port that Dansguardian uses to accept connections. </p> <dl> -<dt>filterip</dt><dd><input class="text" type="text" name="filterip" value="<% io.write( config.filterip.value ) %>" ></dd> -<dt>filterport</dt><dd><input class="text" type="text" name="filterport" value="<% io.write( config.filterport.value ) %>" ></dd> +<% + displayformitem(form.value.filterip) + displayformitem(form.value.filterport) +%> </dl> <h2>Proxy service</h2> @@ -36,8 +42,10 @@ These parameters define the ip address and port that Dansguardian should forward </p> <dl> -<dt>proxyip</dt><dd><input class="text" type="text" name="proxyip" value="<% io.write( config.proxyip.value ) %>"></dd> -<dt>proxyport</dt><dd><input class="text" type="text" name="proxyport" value="<% io.write( config.proxyport.value ) %>"></dd> +<% + displayformitem(form.value.proxyip) + displayformitem(form.value.proxyport) +%> </dl> <h2>Filter Actions</h2> @@ -48,23 +56,15 @@ The author recommends 50 for "young children", 100 for "older children" and 160 </p> <dl> -<dt>accessdeniedaddress</dt><dd><input class="text" type="text" name="accessdeniedaddress" value="<% io.write( config.accessdeniedaddress.value ) %>"></dd> -<dt>naughtynesslimit</dt><dd><input class="text" type="text" name="naughtynesslimit" value="<% io.write( config.naughtynesslimit.value ) %>"></dd> +<% + displayformitem(form.value.accessdeniedaddress) + displayformitem(form.value.naughtynesslimit) +%> </dl> <h2>Save Changes</h2> <dl> -<% -local myform = form.service -local tags = { "cmdsave", } -displayinfo(myform,tags) -%> -<% if (service) and (service.cfgerr) and (#service.cfgerr > 0) then %> -<DT>Config status</DT><DD class="error"><% io.write(service.cfgerr ) %></DD> -<% end %> -<DT>Process information</DT><DD>This process runs as a service. When you make and save changes, the configuration -files for the service are changed. However, the changes will not be <i>applied</i> -until you restart the service.</DD> +<DT></DT><DD><input class="submit" type="submit" name="<%= form.option %>" value="<%= (form.submit or form.option) %>"></DD> </dl> </form> |