summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-01-17 16:31:16 +0000
committerMika Havela <mika.havela@gmail.com>2008-01-17 16:31:16 +0000
commit6ca5241c54100715182a6c436383718175e01a07 (patch)
tree46f8aa23b032ffbe134a31cf7d47eb6feae34b2f
parentdbf1f135f134ed6e51cf8b7be12b36a461ec4ab8 (diff)
downloadacf-alpine-conf-6ca5241c54100715182a6c436383718175e01a07.tar.bz2
acf-alpine-conf-6ca5241c54100715182a6c436383718175e01a07.tar.xz
Now you can add items to include/exclude list
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-conf/trunk@610 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--lbu-config-html.lsp14
-rw-r--r--lbu-controller.lua9
2 files changed, 22 insertions, 1 deletions
diff --git a/lbu-config-html.lsp b/lbu-config-html.lsp
index 6cd1bb6..f0a07ea 100644
--- a/lbu-config-html.lsp
+++ b/lbu-config-html.lsp
@@ -43,6 +43,12 @@
</dl>
<dl>
+<dt>Add item to inlude list</dt>
+<dd><input type="text" name="item_add_include" class="text" value="">
+<input name="cmd_add_include" class="submit" type="submit" value="Add"></dd>
+</dl>
+
+<dl>
<dt>Excluded item(s)</dt>
<dd><select name="lbu_excluded" size="3">
<? for i=1, table.maxn(view.config.lbu_excluded or {}) do ?>
@@ -56,6 +62,12 @@
<dd><input name="cmd_delete_excluded" class="submit" type="submit" value="Delete" > (see above)</dd>
</dl>
+<dl>
+<dt>Add item to exclude list</dt>
+<dd><input type="text" name="item_add_exclude" class="text" value="">
+<input name="cmd_add_exclude" class="submit" type="submit" value="Add"></dd>
+</dl>
+
<H3>Security/Encryption</H3>
<dl>
@@ -102,7 +114,7 @@
<?
---[[ DEBUG INFORMATION
+---[[ DEBUG INFORMATION
require("debugs")
io.write(debugs.variables(view))
--]]
diff --git a/lbu-controller.lua b/lbu-controller.lua
index cdb0bc6..fbae3c9 100644
--- a/lbu-controller.lua
+++ b/lbu-controller.lua
@@ -34,6 +34,15 @@ config = function (self)
if (self.clientdata.config_submit) then
cmdresult = self.model:editconfig(self.clientdata)
end
+ if (self.clientdata.cmd_add_include) then
+ cmdresult = self.model:lbuincexcl("include", self.clientdata.item_add_include, "add")
+ end
+ if (self.clientdata.cmd_add_exclude) then
+ cmdresult = self.model:lbuincexcl("exclude", self.clientdata.item_add_exclude, "add")
+ end
+
+
+
local url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller
return ( {status = self.model:getstatus(),
cmdresult = cmdresult,