From 7a7a2ef2e3117dc8c0ae217b68a29150c266f690 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 22 Oct 2008 18:50:22 +0000 Subject: 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 --- shorewall-controller.lua | 2 +- 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("") --]] %> -<% 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 %> - <%= html.link{value = "edit?filename=" .. file.filename, label=file.filename} %> + <%= html.link{value = "edit?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %> <%= file.filesize %> <%= file.mtime %> -- cgit v1.2.3