summaryrefslogtreecommitdiffstats
path: root/provisioning-edittemplate-html.lsp
blob: 941596848cc66e0732bccc7cc20189bb33d918d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<% local form, viewlibrary, page_info = ... %>
<% htmlviewfunctions = require("htmlviewfunctions") %>
<% html = require("acf.html") %>

<h1><%= html.html_escape(form.label) %></h1>
<h2>Template Details</h2>
<% form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action %>
<% htmlviewfunctions.displayformstart(form) %>
<% 
if page_info.action == "edittemplate" then
	form.value.filename.readonly = "true"
end
htmlviewfunctions.displayformitem(form.value.filename, "filename")
htmlviewfunctions.displayformitem(form.value.label, "label")
htmlviewfunctions.displayformitem(form.value.seq, "seq")
%>

<h2>File Content</h2>
<textarea name="filecontent">
<%= html.html_escape(form.value.filecontent.value) %>
</textarea>
<% if form.value.filecontent.errtxt then %><p class='error'><%= string.gsub(html.html_escape(form.value.filecontent.errtxt), "\n", "<br/>") %></p><% end %>
<% if form.value.filecontent.descr then %><p class='descr'><%= string.gsub(html.html_escape(form.value.filecontent.descr), "\n", "<br/>") %></p><% end %>

<% htmlviewfunctions.displayformend(form) %>