summaryrefslogtreecommitdiffstats
path: root/logfiles-view-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
commit736d860f1c9171512132de7f5ff67c1ed2cf008d (patch)
treed5e25cb790c938fbec97aa2151106283d130f13d /logfiles-view-html.lsp
parent41665704f43110b5126b96a9e11be2ab6f86c60f (diff)
downloadacf-alpine-baselayout-736d860f1c9171512132de7f5ff67c1ed2cf008d.tar.bz2
acf-alpine-baselayout-736d860f1c9171512132de7f5ff67c1ed2cf008d.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/alpine-baselayout/trunk@1560 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'logfiles-view-html.lsp')
-rw-r--r--logfiles-view-html.lsp10
1 files changed, 6 insertions, 4 deletions
diff --git a/logfiles-view-html.lsp b/logfiles-view-html.lsp
index a83153c..338a384 100644
--- a/logfiles-view-html.lsp
+++ b/logfiles-view-html.lsp
@@ -20,17 +20,19 @@ end
</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>
<% if form.value.filecontent.errtxt then %><P CLASS='error'><%= string.gsub(form.value.filecontent.errtxt, "\n", "<BR>") %></P><% end %>
+<% if form.value.filecontent.descr then %><P CLASS='descr'><%= string.gsub(form.value.filecontent.descr, "\n", "<BR>") %></P><% end %>
<% 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>