diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-10-22 18:50:22 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-10-22 18:50:22 +0000 |
commit | 7a7a2ef2e3117dc8c0ae217b68a29150c266f690 (patch) | |
tree | 25b173c621e98de5791779e6b22832f79646284f | |
parent | eed470a7fc1b745ccd198c0b7f42e355bacf455b (diff) | |
download | acf-shorewall-7a7a2ef2e3117dc8c0ae217b68a29150c266f690.tar.bz2 acf-shorewall-7a7a2ef2e3117dc8c0ae217b68a29150c266f690.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/shorewall/trunk@1560 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | shorewall-controller.lua | 2 | ||||
-rw-r--r-- | shorewall-listfiles-html.lsp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/shorewall-controller.lua b/shorewall-controller.lua index 0300bd1..da88e40 100644 --- a/shorewall-controller.lua +++ b/shorewall-controller.lua @@ -39,7 +39,7 @@ function listfiles(self) end function edit(self) - return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit File", "File Saved", "listfiles") + return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit File", "File Saved") end function check(self) diff --git a/shorewall-listfiles-html.lsp b/shorewall-listfiles-html.lsp index df002b2..031839c 100644 --- a/shorewall-listfiles-html.lsp +++ b/shorewall-listfiles-html.lsp @@ -9,7 +9,7 @@ io.write("</span>") --]] %> -<% displaycommandresults({"check"}, session) %> +<% displaycommandresults({"edit", "check"}, session) %> <% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("status") @@ -27,7 +27,7 @@ end %> <% for i,file in ipairs(data.value) do %> <TR> - <TD style="padding-right:20px;white-space:nowrap;"><%= html.link{value = "edit?filename=" .. file.filename, label=file.filename} %></TD> + <TD style="padding-right:20px;white-space:nowrap;"><%= html.link{value = "edit?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %></TD> <TD style="padding-right:20px;white-space:nowrap;"><%= file.filesize %></TD> <TD style="white-space:nowrap;" width="90%"><%= file.mtime %></TD> </TR> |