summaryrefslogtreecommitdiffstats
path: root/freeradius3-viewpasswdfile-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'freeradius3-viewpasswdfile-html.lsp')
-rw-r--r--freeradius3-viewpasswdfile-html.lsp15
1 files changed, 14 insertions, 1 deletions
diff --git a/freeradius3-viewpasswdfile-html.lsp b/freeradius3-viewpasswdfile-html.lsp
index ac8739c..0a2e84b 100644
--- a/freeradius3-viewpasswdfile-html.lsp
+++ b/freeradius3-viewpasswdfile-html.lsp
@@ -22,7 +22,7 @@ html = require("acf.html")
});
</script>
-<% htmlviewfunctions.displaycommandresults({"editpasswdentry", "deletepasswdentry", "editpasswd"}, session) %>
+<% htmlviewfunctions.displaycommandresults({"editpasswdentry", "deletepasswdentry", "editpasswd", "editfile"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createpasswdentry"}, session, true) %>
<% -- This is a hack to redirect back to viewing the same file
@@ -73,6 +73,19 @@ end
</tbody></table></dl>
<% end %>
+
+
+<% if editable and view.value.data and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("editfile") then %>
+<h2>Expert</h2>
+ <dl>
+ <dt></dt>
+ <dd><form action="<%= html.html_escape(page_info.script .. page_info.prefix .. page_info.controller .. '/editfile') %>" method="post">
+ <input type='hidden' name='filename' value='<%= html.html_escape(view.value.filename.value) %>'>
+ <input type='hidden' name='redir' value='<%= html.html_escape(redir) %>'>
+ <input class='submit' type='submit' value='Edit'></form></dd>
+ </dl>
+<% end %>
+
<% if editable and view.value.data and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("createpasswdentry") then
local createform = viewlibrary.dispatch_component("createpasswdentry", {filename=view.value.filename.value, redir=redir}, true) %>
<H2><%= html.html_escape(createform.label) %></H2>