diff options
author | Ted Trask <ttrask01@yahoo.com> | 2016-01-24 22:24:30 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2016-01-24 22:24:30 +0000 |
commit | 43ac64370f5e8d53ecf874048c27d493c5bc01b4 (patch) | |
tree | a560b46ea47a32929e4cfa894309997cb35b2cfe /app/acf-util/password-listlockevents-html.lsp | |
parent | b42210d80281189875c652909b971fcb514ec8b2 (diff) | |
download | acf-core-43ac64370f5e8d53ecf874048c27d493c5bc01b4.tar.bz2 acf-core-43ac64370f5e8d53ecf874048c27d493c5bc01b4.tar.xz |
Add password.listlockevents/unlockuser/unlockip actions to acf-util
password.status now reports locked status for each user
Modified session lib to add list_events/delete_events
Changed session.record_event/count_events to take IP rather than hash
Diffstat (limited to 'app/acf-util/password-listlockevents-html.lsp')
-rw-r--r-- | app/acf-util/password-listlockevents-html.lsp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/app/acf-util/password-listlockevents-html.lsp b/app/acf-util/password-listlockevents-html.lsp new file mode 100644 index 0000000..81ea7f6 --- /dev/null +++ b/app/acf-util/password-listlockevents-html.lsp @@ -0,0 +1,48 @@ +<% local view, viewlibrary, page_info, session = ... +htmlviewfunctions = require("htmlviewfunctions") +html = require("acf.html") +%> + +<script type="text/javascript"> + if (typeof jQuery == 'undefined') { + document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery-latest.js"><\/script>'); + } +</script> + +<script type="text/javascript"> + if (typeof $.tablesorter == 'undefined') { + document.write('<script type="text/javascript" src="<%= html.html_escape(page_info.wwwprefix) %>/js/jquery.tablesorter.js"><\/script>'); + } +</script> + +<script type="text/javascript"> + $(document).ready(function() { + $("#list").tablesorter({ headers: {2:{sorter: 'ipAddress'}}, widgets: ['zebra']}); + }); +</script> + + +<% htmlviewfunctions.displaycommandresults({"unlockuser", "unlockip"}, session, true) %> + +<% local header_level = htmlviewfunctions.displaysectionstart(view, page_info) %> +<table id="list" class="tablesorter"><thead> + <tr> + <th>User ID</th> + <th>IP Address</th> + <th>Time</th> + </tr> +</thead><tbody> +<% for i,lock in ipairs( view.value ) do %> + <tr> + <td><%= html.html_escape(lock.userid) %></td> + <td><%= html.html_escape(lock.ip) %></td> + <td><%= format.formattime(lock.time) %></td> + </tr> +<% end %> +</tbody></table> +<% htmlviewfunctions.displaysectionend(header_level) %> + +<% if viewlibrary and viewlibrary.dispatch_component then + viewlibrary.dispatch_component("unlockuser") + viewlibrary.dispatch_component("unlockip") +end %> |