summaryrefslogtreecommitdiffstats
path: root/freeradius3-viewpasswdfile-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-09-15 17:55:41 +0000
committerTed Trask <ttrask01@yahoo.com>2014-09-15 17:55:41 +0000
commitbb693ddd74d12f55487b16eab7da40fc2ff13988 (patch)
tree99cdf8d225fe94dee1b33491baaac5933f4b5bdb /freeradius3-viewpasswdfile-html.lsp
parent47c61e5dd2476f6eab7d50b1794d29412759858f (diff)
downloadacf-freeradius3-bb693ddd74d12f55487b16eab7da40fc2ff13988.tar.bz2
acf-freeradius3-bb693ddd74d12f55487b16eab7da40fc2ff13988.tar.xz
Implement deletepasswdentry action
Diffstat (limited to 'freeradius3-viewpasswdfile-html.lsp')
-rw-r--r--freeradius3-viewpasswdfile-html.lsp6
1 files changed, 5 insertions, 1 deletions
diff --git a/freeradius3-viewpasswdfile-html.lsp b/freeradius3-viewpasswdfile-html.lsp
index d6cc3eb..5e6ad7f 100644
--- a/freeradius3-viewpasswdfile-html.lsp
+++ b/freeradius3-viewpasswdfile-html.lsp
@@ -17,11 +17,12 @@ html = require("acf.html")
<script type="text/javascript">
$(document).ready(function() {
+ $(".deletepasswdentry").click(function(){ return confirm("Are you sure you want to delete this entry?")});
$("#list").tablesorter({headers: {0:{sorter: false}}, widgets: ['zebra']});
});
</script>
-<% htmlviewfunctions.displaycommandresults({"editpasswdentry", "editpasswd"}, session) %>
+<% htmlviewfunctions.displaycommandresults({"editpasswdentry", "deletepasswdentry", "editpasswd"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createpasswdentry"}, session, true) %>
<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
@@ -51,6 +52,9 @@ redir.value = redir.value.."?filename="..html.url_encode(view.value.filename.val
<% if viewlibrary.check_permission("editpasswdentry") then %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, entry=entry, redir=redir}, label="", option="Edit", action="editpasswdentry"}), page_info, -1) %>
<% end %>
+ <% if viewlibrary.check_permission("deletepasswdentry") then %>
+ <% htmlviewfunctions.displayitem(cfe({type="form", value={filename=filename, entry=entry}, label="", option="Delete", action="deletepasswdentry", class="deletepasswdentry"}), page_info, -1) %>
+ <% end %>
<% if 0 < containspasswd and r[containspasswd] ~= "" and viewlibrary.check_permission("editpasswd") then %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, entry=entry, redir=redir}, label="", option="Change Pass", action="editpasswd"}), page_info, -1) %>
<% end %>