diff options
Diffstat (limited to 'freeradius3-editmacauthfile-html.lsp')
-rw-r--r-- | freeradius3-editmacauthfile-html.lsp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/freeradius3-editmacauthfile-html.lsp b/freeradius3-editmacauthfile-html.lsp index 940abf2..5781544 100644 --- a/freeradius3-editmacauthfile-html.lsp +++ b/freeradius3-editmacauthfile-html.lsp @@ -1,4 +1,4 @@ -<% local form, viewlibrary, page_info = ... %> +<% local form, viewlibrary, page_info, session = ... %> <% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> @@ -71,6 +71,8 @@ }); </script> +<% htmlviewfunctions.displaycommandresults({"editfile"}, session) %> + <h1>Edit MAC Authentication File</h1> <dl> <% @@ -88,6 +90,7 @@ htmlviewfunctions.displayitem(form.value.mtime) form.value.filecontent.type = "hidden" htmlviewfunctions.displayformitem(form.value.filecontent, "filecontent") %> +<% if not form.value.filename.errtxt then %> <table id="entries"> <% for line in string.gmatch(html.html_escape(form.value.filecontent.value), "([^\n]*)\n?") do %> <tr><td><%= line %></td></tr> @@ -99,3 +102,15 @@ htmlviewfunctions.displayitem(form.value.mtime) htmlviewfunctions.displayformend(form) %> </dl> +<% end %> + +<% if not form.value.filename.errtxt 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(form.value.filename.value) %>'> + <input type='hidden' name='redir' value='<%= html.html_escape(page_info.orig_action.."?filename="..html.url_encode(form.value.filename.value)) %>'> + <input class='submit' type='submit' value='Edit'></form></dd> + </dl> +<% end %> |