summaryrefslogtreecommitdiffstats
path: root/kamailio-listusers-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'kamailio-listusers-html.lsp')
-rw-r--r--kamailio-listusers-html.lsp10
1 files changed, 7 insertions, 3 deletions
diff --git a/kamailio-listusers-html.lsp b/kamailio-listusers-html.lsp
index 0b7183f..47b7c2d 100644
--- a/kamailio-listusers-html.lsp
+++ b/kamailio-listusers-html.lsp
@@ -27,7 +27,7 @@
<% htmlviewfunctions.displaycommandresults({"deleteuser", "updateuser"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createuser"}, session, true) %>
-<h1><%= html.html_escape(form.label) %></h1>
+<% local header_level = htmlviewfunctions.displaysectionstart(form, page_info) %>
<table id="list" class="tablesorter"><thead>
<tr>
<% if viewlibrary.check_permission("deleteuser") or viewlibrary.check_permission("updateuser") then %>
@@ -37,15 +37,18 @@
<th>Password</th>
</tr>
</thead><tbody>
+<% local username = cfe({ type="hidden", value="" }) %>
+<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
<% for i,user in ipairs(form.value) do %>
<tr>
+ <% username.value = user.username %>
<% if viewlibrary.check_permission("deleteuser") or viewlibrary.check_permission("updateuser") then %>
<td>
<% if viewlibrary.check_permission("updateuser") then %>
- <%= html.link{value = "updateuser?username=" .. user.username.."&redir="..page_info.orig_action, label="Update "} %>
+ <% htmlviewfunctions.displayitem(cfe({type="link", value={username=username, redir=redir}, label="", option="Update", action="updateuser"}), page_info, -1) %>
<% end %>
<% if viewlibrary.check_permission("deleteuser") then %>
- <%= html.link{value = "deleteuser?submit=true&username=" .. user.username, label="Delete "} %>
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={username=username}, label="", option="Delete", action="deleteuser"}), page_info, -1) %>
<% end %>
</td>
<% end %>
@@ -58,6 +61,7 @@
</tr>
<% end %>
</tbody></table>
+<% htmlviewfunctions.displaysectionend(header_level) %>
<% if viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createuser") then
viewlibrary.dispatch_component("createuser")