diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-04-12 04:08:02 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-04-12 04:08:02 +0000 |
commit | eb046ff591c5abe9f2cd1f493ab8756d0abf61cf (patch) | |
tree | 4ab164ef446c989131b087d9db258b409b150402 /openssh-listauth-html.lsp | |
parent | 0d87bb5527f504012fa877a988f1a3e7591ba584 (diff) | |
download | acf-openssh-eb046ff591c5abe9f2cd1f493ab8756d0abf61cf.tar.bz2 acf-openssh-eb046ff591c5abe9f2cd1f493ab8756d0abf61cf.tar.xz |
Changes to use new htmlviewfunctions functions and change connectedpeers to return cfe
Diffstat (limited to 'openssh-listauth-html.lsp')
-rw-r--r-- | openssh-listauth-html.lsp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openssh-listauth-html.lsp b/openssh-listauth-html.lsp index 8d8ebad..d0b5e3e 100644 --- a/openssh-listauth-html.lsp +++ b/openssh-listauth-html.lsp @@ -23,7 +23,7 @@ <% htmlviewfunctions.displaycommandresults({"deleteauth"}, session) %> <% htmlviewfunctions.displaycommandresults({"addauth"}, session, true) %> -<h1>Authorized Keys for <%= html.html_escape(view.value.user.value) %></h1> +<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Authorized Keys for "..view.value.user.value}), page_info) %> <table id="list" class="tablesorter"><thead> <tr> <th>Action</th> @@ -31,14 +31,13 @@ <th>Key</th> </tr> </thead><tbody> +<% local user = cfe({ type="hidden", value=view.value.user.value }) %> +<% local authid = cfe({ type="hidden", value="" }) %> <% for i,auth in ipairs(view.value.auth.value) do %> <tr> <td> -<form action="<%= html.html_escape(page_info.script..page_info.prefix..page_info.controller.."/deleteauth") %>" method="post"> -<input class="hidden" type="hidden" name="user" value="<%= html.html_escape(view.value.user.value) %>"> -<input class="hidden" type="hidden" name="auth" value="<%= html.html_escape(auth.id) %>"> -<input class="submit" type="submit" name="submit" value="Delete"> -</form> + <% authid.value = auth.id %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={user=user, auth=authid}, label="", option="Delete", action="deleteauth"}), page_info, -1) %> </td> <td><%= html.html_escape(auth.id) %></td> <td><% if #auth.key>32 then io.write(html.html_escape(string.sub(auth.key,0,16)) .. " ... " .. html.html_escape(string.sub(auth.key, -16))) else io.write(html.html_escape(auth.key)) end %></td> @@ -46,5 +45,6 @@ <% end %> </tbody></table> <p>In order to preserve keys with lbu, you must add /<% if view.value.user.value ~= "root" then io.write("home/") end %><%= view.value.user.value %>/.ssh/authorized_keys to lbu include +<% htmlviewfunctions.displaysectionend(header_level) %> <% viewlibrary.dispatch_component("addauth", {user=view.value.user.value}) %> |