Commit 375ed538 authored by Ted Trask's avatar Ted Trask

Fix viewtable HTML redir with GET parm for each form

parent 962f455c
......@@ -21,6 +21,8 @@
});
</script>
<% local redir = cfe({ type="hidden", value=page_info.orig_action.."?table="..html.url_encode(form.value.table.value) }) %>
<% htmlviewfunctions.displaycommandresults({"deletetableentry", "updatetableentry"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createtableentry"}, session, true) %>
......@@ -36,7 +38,6 @@
<% end %>
</tr>
</thead><tbody>
<% local redir = cfe({ type="hidden", value=page_info.orig_action.."?table="..form.value.table.value }) %>
<% local table = cfe({ type="hidden", value=form.value.table.value }) %>
<% local id = cfe({ type="hidden" }) %>
<% for i,tableentry in ipairs(form.value.entries.value) do %>
......@@ -48,7 +49,7 @@
<% htmlviewfunctions.displayitem(cfe({type="link", value={table=table, id=id, redir=redir}, label="", option="Update", action="updatetableentry"}), page_info, -1) %>
<% end %>
<% if viewlibrary.check_permission("deletetableentry") then %>
<% htmlviewfunctions.displayitem(cfe({type="form", value={table=table, id=id}, label="", option="Delete", action="deletetableentry", class="deletetableentry"}), page_info, -1) %>
<% htmlviewfunctions.displayitem(cfe({type="form", value={table=table, id=id, redir=redir}, label="", option="Delete", action="deletetableentry", class="deletetableentry"}), page_info, -1) %>
<% end %>
</td>
<% end %>
......@@ -65,5 +66,5 @@
<% htmlviewfunctions.displaysectionend(header_level) %>
<% if page_info.action == "viewtable" and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createtableentry") then
viewlibrary.dispatch_component("createtableentry", {table=form.value.table.value})
viewlibrary.dispatch_component("createtableentry", {table=form.value.table.value, redir=redir.value})
end %>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment