summaryrefslogtreecommitdiffstats
path: root/freeradius3-editmacauthfile-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'freeradius3-editmacauthfile-html.lsp')
-rw-r--r--freeradius3-editmacauthfile-html.lsp8
1 files changed, 8 insertions, 0 deletions
diff --git a/freeradius3-editmacauthfile-html.lsp b/freeradius3-editmacauthfile-html.lsp
index 15a8200..c9015c0 100644
--- a/freeradius3-editmacauthfile-html.lsp
+++ b/freeradius3-editmacauthfile-html.lsp
@@ -76,6 +76,7 @@ local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Edit MAC
htmlviewfunctions.displayitem(form.value.filename)
htmlviewfunctions.displayitem(form.value.filesize)
htmlviewfunctions.displayitem(form.value.mtime)
+if not form.value.filename.errtxt then
local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Entries"}), page_info, htmlviewfunctions.incrementheader(header_level))
htmlviewfunctions.displayformstart(form, page_info)
form.value.filename.type = "hidden"
@@ -92,5 +93,12 @@ local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Entries"
htmlviewfunctions.displayinfo(form.value.filecontent)
htmlviewfunctions.displayformend(form)
htmlviewfunctions.displaysectionend(header_level2)
+end
htmlviewfunctions.displaysectionend(header_level)
%>
+
+<% if not form.value.filename.errtxt and viewlibrary and viewlibrary.dispatch_component and viewlibrary.check_permission("editfile" then
+ local filename = cfe({ type="hidden", value=form.value.filename.value })
+ local redir = cfe({ type="hidden", value=page_info.orig_action.."?filename="..html.url_encode(form.value.filename.value) })
+ htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="Expert", option="Edit", action="editfile"}), page_info, htmlviewfunctions.incrementheader(header_level)) %>
+end %>