From c91120a07c16044b1073b124646cb812d13e658e Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 16 Sep 2014 00:51:46 +0000 Subject: Implement editmacauthfile action --- freeradius3-editmacauthfile-html.lsp | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 freeradius3-editmacauthfile-html.lsp (limited to 'freeradius3-editmacauthfile-html.lsp') diff --git a/freeradius3-editmacauthfile-html.lsp b/freeradius3-editmacauthfile-html.lsp new file mode 100644 index 0000000..756abf3 --- /dev/null +++ b/freeradius3-editmacauthfile-html.lsp @@ -0,0 +1,96 @@ +<% local form, viewlibrary, page_info = ... %> +<% htmlviewfunctions = require("htmlviewfunctions") %> +<% html = require("acf.html") %> + + + + + +<% +local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Edit MAC Authentication File"}), page_info) +htmlviewfunctions.displayitem(form.value.filename) +htmlviewfunctions.displayitem(form.value.filesize) +htmlviewfunctions.displayitem(form.value.mtime) +local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="Entries"}), page_info, htmlviewfunctions.incrementheader(header_level)) + htmlviewfunctions.displayformstart(form, page_info) + form.value.filename.type = "hidden" + htmlviewfunctions.displayformitem(form.value.filename, "filename") + form.value.filecontent.type = "hidden" + htmlviewfunctions.displayformitem(form.value.filecontent, "filecontent") +%> + +<% for line in string.gmatch(html.html_escape(form.value.filecontent.value), "([^\n]*)\n?") do %> + +<% end %> +
<%= line %>
+<% + htmlviewfunctions.displayinfo(form.value.filecontent) + htmlviewfunctions.displayformend(form) +htmlviewfunctions.displaysectionend(header_level2) +htmlviewfunctions.displaysectionend(header_level) +%> -- cgit v1.2.3