diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-03-02 22:09:28 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-03-02 22:09:28 +0000 |
commit | a1a5eda62871cee8a691ed6ba6175a9560259c90 (patch) | |
tree | c434cdf64675e0f30845c9ec7f5c88302f7d137d | |
parent | 7dc633b8623b747d364e4f89dd0e241d3cdb7b03 (diff) | |
download | acf-apk-tools-a1a5eda62871cee8a691ed6ba6175a9560259c90.tar.bz2 acf-apk-tools-a1a5eda62871cee8a691ed6ba6175a9560259c90.tar.xz |
Make sure forms in details HTML view redirect to details of the same package
-rw-r--r-- | apk-details-html.lsp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apk-details-html.lsp b/apk-details-html.lsp index 814234a..75b2aae 100644 --- a/apk-details-html.lsp +++ b/apk-details-html.lsp @@ -1,4 +1,5 @@ <% local data, viewlibrary, page_info, session = ... +html = require("acf.html") htmlviewfunctions = require("htmlviewfunctions") %> @@ -16,10 +17,11 @@ htmlviewfunctions.displayitem(data.value.upgrade) %> <% local packagecfe = cfe({ type="hidden", value=data.value.package.value }) %> +<% local redir = cfe({ type="hidden", value=page_info.orig_action.."?package="..html.url_encode(data.value.package.value) }) %> <% if viewlibrary.check_permission("install") and data.value.installed.value == "" then %> - <% htmlviewfunctions.displayitem(cfe({type="form", value={package=packagecfe}, label="Install", option="Install", action="install" }), page_info, 0) %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={package=packagecfe, redir=redir}, label="Install", option="Install", action="install" }), page_info, 0) %> <% elseif viewlibrary.check_permission("upgrade") and data.value.upgrade.value ~= "" then %> - <% htmlviewfunctions.displayitem(cfe({type="form", value={package=packagecfe}, label="Upgrade", option="Upgrade", action="upgrade" }), page_info, 0) %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={package=packagecfe, redir=redir}, label="Upgrade", option="Upgrade", action="upgrade" }), page_info, 0) %> <% end %> <% htmlviewfunctions.displaysectionend(header_level) %> |