diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-10-28 03:21:24 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-10-28 03:21:24 +0000 |
commit | fb7f65d60670cf322429daaa263fc847476a865d (patch) | |
tree | d454481357cba42c967db258592f1ce1398cd95a | |
parent | e9d1dabb876d1644d83a7961a593af4e15eef9b5 (diff) | |
download | acf-iptables-fb7f65d60670cf322429daaa263fc847476a865d.tar.bz2 acf-iptables-fb7f65d60670cf322429daaa263fc847476a865d.tar.xz |
Removed unneeded views by updating CFE for autoview
l--------- | iptables-createchain-html.lsp | 1 | ||||
-rw-r--r-- | iptables-editchain-html.lsp | 16 | ||||
-rw-r--r-- | iptables-model.lua | 10 |
3 files changed, 7 insertions, 20 deletions
diff --git a/iptables-createchain-html.lsp b/iptables-createchain-html.lsp deleted file mode 120000 index 4ff1163..0000000 --- a/iptables-createchain-html.lsp +++ /dev/null @@ -1 +0,0 @@ -iptables-editchain-html.lsp
\ No newline at end of file diff --git a/iptables-editchain-html.lsp b/iptables-editchain-html.lsp deleted file mode 100644 index 3648a39..0000000 --- a/iptables-editchain-html.lsp +++ /dev/null @@ -1,16 +0,0 @@ -<% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") -html = require("acf.html") -%> - -<H1><%= html.html_escape(form.label) %></H1> -<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - if page_info.action == "editchain" then - form.value.table.readonly = true - form.value.table.type = "text" - form.value.chain.readonly = true - end - local order = {"table", "chain", "policy"} - htmlviewfunctions.displayform(form, order) -%> diff --git a/iptables-model.lua b/iptables-model.lua index e06512e..537baea 100644 --- a/iptables-model.lua +++ b/iptables-model.lua @@ -221,19 +221,23 @@ end function read_chain(tab, chain) local retval = {} - retval.table = cfe({ type="select", value=tab or "filter", label="Table", option=tables }) - retval.chain = cfe({ value=chain or "", label="Chain" }) + retval.table = cfe({ type="select", value=tab or "filter", label="Table", option=tables, seq=1 }) + retval.chain = cfe({ value=chain or "", label="Chain", seq=2 }) getdetails() if tab and not details[tab] then retval.table.errtxt = "Invalid table" end if chain then + retval.table.readonly = true + retval.table.type = "text" + retval.chain.readonly = true + local chn = find_chain(retval.table.value, chain) if not chn then retval.chain.errtxt = "Cannot find chain" elseif chn.policy then -- only built-in chains can have policies, and the target can only be DROP or ACCEPT - retval.policy = cfe({ type="select", value=chn.policy, label="Policy", option={"DROP", "ACCEPT"} }) + retval.policy = cfe({ type="select", value=chn.policy, label="Policy", option={"DROP", "ACCEPT"}, seq=3 }) end end return cfe({ type="group", value=retval, label="Chain" }) |