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 | b9fa0863345ea52d8aa8a563b5fc7981f160de6a (patch) | |
| tree | 4725cb48cc318684af1703e536eae33534842f66 | |
| parent | 4b6fbdddf381f2f9b85a35700bb11021f33fb8f3 (diff) | |
| download | acf-fetchmail-b9fa0863345ea52d8aa8a563b5fc7981f160de6a.tar.bz2 acf-fetchmail-b9fa0863345ea52d8aa8a563b5fc7981f160de6a.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/fetchmail/trunk@1560 ab2d0c66-481e-0410-8bed-d214d4d58bed
| -rw-r--r-- | fetchmail-config-html.lsp | 3 | ||||
| -rw-r--r-- | fetchmail-listentries-html.lsp | 5 | 
2 files changed, 5 insertions, 3 deletions
diff --git a/fetchmail-config-html.lsp b/fetchmail-config-html.lsp index b686400..ac44511 100644 --- a/fetchmail-config-html.lsp +++ b/fetchmail-config-html.lsp @@ -1,7 +1,7 @@  <% local view, viewlibrary, page_info, session = ... %>  <% require("viewfunctions") %> -<% displaycommandresults({"deleteentry"}, session) %> +<% displaycommandresults({"editconfig", "editentry", "deleteentry", "createentry"}, session) %>  <% if viewlibrary and viewlibrary.dispatch_component then  	viewlibrary.dispatch_component("status") @@ -12,6 +12,7 @@ end %>  <DL>  <dt>Edit global settings</dt>  <dd><form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/editconfig" %>" method="POST"> +<input class="hidden" type="hidden"  name="redir"  value="<%= page_info.orig_action %>" >  <input type=submit value="Edit" class="submit">  </form></dd>  </DL> diff --git a/fetchmail-listentries-html.lsp b/fetchmail-listentries-html.lsp index 2b2e54e..982ce9d 100644 --- a/fetchmail-listentries-html.lsp +++ b/fetchmail-listentries-html.lsp @@ -9,7 +9,7 @@ io.write("</span>")  --]]  %> -<% displaycommandresults({"deleteentry"}, session) %> +<% displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %>  <h1>Edit/View Fetchmail Entries</h1>  <DL> @@ -23,7 +23,7 @@ io.write("</span>")  <% for i,entry in ipairs(data.value) do %>  	<TR>  		<TD style="padding-right:20px;white-space:nowrap;"> -			<% io.write(html.link{value = "editentry?entry=" .. entry.entry, label="Edit " }) %> +			<% io.write(html.link{value = "editentry?entry=" .. entry.entry.."&redir="..page_info.orig_action, label="Edit " }) %>  			<% io.write(html.link{value = "deleteentry?entry=" .. entry.entry, label="Delete " }) %>  		</TD>  		<TD style="padding-right:20px;white-space:nowrap;"><%= entry.entry %></TD> @@ -35,6 +35,7 @@ io.write("</span>")  <DT>Add new entry</DT>  <DD><form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/createentry" %>" method="POST"> +<input class="hidden" type="hidden"  name="redir"  value="<%= page_info.orig_action %>" >  <input type=submit value="New" class="submit">  </form></DD>  </DL>  | 
