summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-10-22 18:50:22 +0000
committerTed Trask <ttrask01@yahoo.com>2008-10-22 18:50:22 +0000
commite5305fc34efdb3fd8ded9e2fee619181e04dcc67 (patch)
tree369fea6b459f0e13aae14026edd7ceb5ecc32fe6
parent13764b19ce88da690c8446ac7e859287b9996368 (diff)
downloadacf-tcpproxy-e5305fc34efdb3fd8ded9e2fee619181e04dcc67.tar.bz2
acf-tcpproxy-e5305fc34efdb3fd8ded9e2fee619181e04dcc67.tar.xz
Modified viewfunctions to split displayform, creating displayformstart and displayformend, to provide flexibility while still using the library. Also added support for hidden fields - including a common redir field. Removed redirectOnSuccess from controllerfunctions handle_form, and replaced it with the redir field. Removed redirectOnSuccess from controllers that used it and added handlecommandresults and redir entries to links and forms throughout many views. This will cause a redirect to the originating view when a form is successfully completed. acf_www-controller now includes orig_action in page_info to report the original action launched by the user.
git-svn-id: svn://svn.alpinelinux.org/acf/tcpproxy/trunk@1560 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--tcpproxy-listsmtpentries-html.lsp4
-rw-r--r--tcpproxy-listsmtpfiles-html.lsp4
-rw-r--r--tcpproxy-smtpstatus-html.lsp2
3 files changed, 5 insertions, 5 deletions
diff --git a/tcpproxy-listsmtpentries-html.lsp b/tcpproxy-listsmtpentries-html.lsp
index 7cfa651..fb8e761 100644
--- a/tcpproxy-listsmtpentries-html.lsp
+++ b/tcpproxy-listsmtpentries-html.lsp
@@ -2,7 +2,7 @@
require("viewfunctions")
%>
-<% displaycommandresults({"delsmtpentry"}, session) %>
+<% displaycommandresults({"editsmtpentry", "delsmtpentry"}, session) %>
<H1>Interface Entries</H1>
<DL>
@@ -16,7 +16,7 @@ require("viewfunctions")
<% for i,interface in ipairs(view.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpentry?ipaddr="..(interface.ipaddr or interface.interface), label="Edit "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpentry?ipaddr="..(interface.ipaddr or interface.interface).."&redir="..page_info.orig_action, label="Edit "} %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsmtpentry?ipaddr="..(interface.ipaddr or interface.interface), label="Delete "} %>
</TD>
<TD style="padding-right:20px;white-space:nowrap;"><%= interface.interface or "" %></TD>
diff --git a/tcpproxy-listsmtpfiles-html.lsp b/tcpproxy-listsmtpfiles-html.lsp
index 753857b..f323d64 100644
--- a/tcpproxy-listsmtpfiles-html.lsp
+++ b/tcpproxy-listsmtpfiles-html.lsp
@@ -2,7 +2,7 @@
require("viewfunctions")
%>
-<% displaycommandresults({"delsmtpfile"}, session) %>
+<% displaycommandresults({"editsmtpfile", "delsmtpfile"}, session) %>
<H1>Files</H1>
<DL>
@@ -14,7 +14,7 @@ require("viewfunctions")
<% for i,file in ipairs(view.value) do %>
<TR>
<TD style="padding-right:20px;white-space:nowrap;">
- <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpfile?filename="..file, label="Edit "} %>
+ <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/editsmtpfile?filename="..file.."&redir="..page_info.orig_action, label="Edit "} %>
<%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/delsmtpfile?filename="..file, label="Delete "} %>
</TD>
<TD style="white-space:nowrap;"><%= file %></TD>
diff --git a/tcpproxy-smtpstatus-html.lsp b/tcpproxy-smtpstatus-html.lsp
index c639424..97993a4 100644
--- a/tcpproxy-smtpstatus-html.lsp
+++ b/tcpproxy-smtpstatus-html.lsp
@@ -2,7 +2,7 @@
require("viewfunctions")
%>
-<% displaycommandresults({"delsmtpentry", "delsmtpfile"}, session) %>
+<% displaycommandresults({"editsmtpentry", "delsmtpentry", "editsmtpfile", "delsmtpfile"}, session) %>
<H1>SMTP Proxy Status</H1>
<DL>