summaryrefslogtreecommitdiffstats
path: root/openssh-listauth-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'openssh-listauth-html.lsp')
-rw-r--r--openssh-listauth-html.lsp12
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}) %>