summaryrefslogtreecommitdiffstats
path: root/app/filedetails-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
commit8997f1f6dc27262042a30c35266a95672e4406d4 (patch)
tree548e8a666a7aa8f6e39e76e47b0c150d44dd92f1 /app/filedetails-html.lsp
parent7106e09511f1b873eaae17d2a6ae8bf008d06446 (diff)
downloadacf-core-8997f1f6dc27262042a30c35266a95672e4406d4.tar.bz2
acf-core-8997f1f6dc27262042a30c35266a95672e4406d4.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/core/trunk@1560 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'app/filedetails-html.lsp')
-rw-r--r--app/filedetails-html.lsp9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/filedetails-html.lsp b/app/filedetails-html.lsp
index 4c1f116..ccf7a0c 100644
--- a/app/filedetails-html.lsp
+++ b/app/filedetails-html.lsp
@@ -17,10 +17,11 @@ displayitem(form.value.mtime)
</DL>
<H3>File Content</H3>
-<% if form.descr then %><P CLASS='descr'><%= string.gsub(form.descr, "\n", "<BR>") %></P><% end %>
-<% if form.errtxt then %><P CLASS='error'><%= string.gsub(form.errtxt, "\n", "<BR>") %></P><% end %>
-<form action="<%= page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>" method="POST">
+<% if form.type == "form" then %>
+<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>
+<% displayformstart(form) %>
<input type="hidden" name="filename" value="<%= form.value.filename.value %>">
+<% end %>
<textarea name="filecontent">
<%= html.html_escape(form.value.filecontent.value) %>
</textarea>
@@ -29,6 +30,6 @@ displayitem(form.value.mtime)
<% if form.type == "form" then %>
<H3>Save</H3>
-<DL><DT>Submit and save above changes</DT><DD><input class="submit" type="submit" name="<%= form.option %>" value="<%= form.option %>"></DD></DL>
+<% displayformend(form) %>
<% end %>
</form>