diff options
author | Ted Trask <ttrask01@yahoo.com> | 2015-11-20 21:29:36 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2015-11-20 21:29:36 +0000 |
commit | 3620bdf0c1521d001901de3fec8027ff5d053e3a (patch) | |
tree | 804b07f7c3fc8681eff076c24f1dfabbe0170863 | |
parent | 6517f235650e374a195cae6d7b98050089f9464f (diff) | |
download | acf-core-3620bdf0c1521d001901de3fec8027ff5d053e3a.tar.bz2 acf-core-3620bdf0c1521d001901de3fec8027ff5d053e3a.tar.xz |
Modify filedetails HTML view to better handle errors
-rw-r--r-- | app/filedetails-html.lsp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/app/filedetails-html.lsp b/app/filedetails-html.lsp index 03cb37b..2dd90e5 100644 --- a/app/filedetails-html.lsp +++ b/app/filedetails-html.lsp @@ -10,6 +10,7 @@ if form.type == "form" then else header_level = htmlviewfunctions.displaysectionstart(cfe({label="View File"}), page_info) end +htmlviewfunctions.displayinfo(form) header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="File Details"}), page_info, htmlviewfunctions.incrementheader(header_level)) htmlviewfunctions.displayitem(form.value.filename) @@ -21,27 +22,29 @@ end htmlviewfunctions.displaysectionend(header_level2) -htmlviewfunctions.displaysectionstart(cfe({label="File Content"}), page_info, header_level2) -if form.type == "form" then - htmlviewfunctions.displayformstart(form, page_info) - form.value.filename.type = "hidden" - for name,value in pairs(form.value) do - if value.type == "hidden" then - htmlviewfunctions.displayformitem(value, name) +if form.value.filecontent then + htmlviewfunctions.displaysectionstart(cfe({label="File Content"}), page_info, header_level2) + if form.type == "form" then + htmlviewfunctions.displayformstart(form, page_info) + form.value.filename.type = "hidden" + for name,value in pairs(form.value) do + if value.type == "hidden" then + htmlviewfunctions.displayformitem(value, name) + end end end -end %> <textarea name="filecontent"> <%= html.html_escape(form.value.filecontent.value) %> </textarea> <% -htmlviewfunctions.displayinfo(form.value.filecontent) + htmlviewfunctions.displayinfo(form.value.filecontent) -if form.type == "form" then - htmlviewfunctions.displayformend(form) + if form.type == "form" then + htmlviewfunctions.displayformend(form) + end + htmlviewfunctions.displaysectionend(header_level2) end -htmlviewfunctions.displaysectionend(header_level2) htmlviewfunctions.displaysectionend(header_level) if form.type == "form" then |