summaryrefslogtreecommitdiffstats
path: root/tinydns-listfiles-html.lsp
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
commite3f8780934093cbf4618bfa39f69f25920dfb28e (patch)
treedd814655da1ea2d1418c6a835832e7ca3b071a0d /tinydns-listfiles-html.lsp
parent3088e2bc26e85098dccc3aa68373a634bf9abda4 (diff)
downloadacf-tinydns-e3f8780934093cbf4618bfa39f69f25920dfb28e.tar.bz2
acf-tinydns-e3f8780934093cbf4618bfa39f69f25920dfb28e.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/tinydns/trunk@1560 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'tinydns-listfiles-html.lsp')
-rw-r--r--tinydns-listfiles-html.lsp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tinydns-listfiles-html.lsp b/tinydns-listfiles-html.lsp
index 0046d91..e700b3c 100644
--- a/tinydns-listfiles-html.lsp
+++ b/tinydns-listfiles-html.lsp
@@ -9,7 +9,7 @@ io.write("</span>")
--]]
%>
-<% displaycommandresults({"delete"}, session) %>
+<% displaycommandresults({"delete", "edit", "editfile"}, session) %>
<h1>Configuration</h1>
<h2>Edit/View existing Domains</h2>
@@ -26,8 +26,8 @@ io.write("</span>")
<%
if session.permissions.tinydns.delete then io.write(html.link{value = "delete?filename=" .. file.value.filename.value, label="Delete " }) end
io.write(html.link{value = "view?filename=" .. file.value.filename.value, label="View " })
- if session.permissions.tinydns.edit then io.write(html.link{value = "edit?filename=" .. file.value.filename.value, label="Edit " }) end
- if session.permissions.tinydns.editfile then io.write(html.link{value = "editfile?filename=" .. file.value.filename.value, label="Expert " }) end
+ if session.permissions.tinydns.edit then io.write(html.link{value = "edit?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Edit " }) end
+ if session.permissions.tinydns.editfile then io.write(html.link{value = "editfile?filename=" .. file.value.filename.value.."&redir="..page_info.orig_action, label="Expert " }) end
%>
</TD>
<TD style="padding-right:20px;white-space:nowrap;text-align:right;"><%= file.value.filesize.value %></TD>
@@ -41,6 +41,6 @@ io.write("</span>")
local newfileform = viewlibrary.dispatch_component("newfile", nil, true) %>
<h2>Create new Domain</h2>
<%
- newfileform.action = "newfile"
+ newfileform.action = page_info.script .. page_info.prefix .. page_info.controller .. "/newfile"
displayform(newfileform)
end %>