summaryrefslogtreecommitdiffstats
path: root/shorewall-edit-html.lsp
blob: f808a7267119aa4c1d02a97f3a319c1f70b7eae1 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<% local form, viewlibrary = ... 
require("viewfunctions")
%>

<% if viewlibrary and viewlibrary.dispatch_component then
	viewlibrary.dispatch_component("statusbasic")
end %>

<H1>CONFIGURATION</H1>
<% local myform = form.config %>
<form action="<%= form.option.script .. "/" .. form.option.prefix ..
		form.option.controller .. "/" .. form.option.action %>" method="POST">

<H2>EXPERT CONFIGURATION</H2>
<H3>FILE DETAILS</H3>
<DL>
<% 
local tags = { "filename","filesize", "mtime", "sumerrors" }
displayinfo(myform,tags,"viewonly")
%>
</DL>

<% if (form.config.filecontent) then %>

<H3>FILE CONTENT</H3>
<input type="hidden" value="<%= myform.filename.value %>" name="<%= myform.filename.name %>">
<% 
io.write(html.form[form.config.filecontent.type](form.config.filecontent))
%>

<H2>SAVE AND APPLY ABOVE SETTINGS</H2>
<DL>
<% 
local tags = { "cmdsave", }
displayinfo(myform,tags)
%>
</DL>

<% end %>

<%
-- Management buttons
local myform = form.management
local tags = { "start", "stop", "restart" }
if (myform) then
	io.write("<H1>MANAGEMENT</H1>\n<DL>")
	displaymanagement(myform,tags)
	io.write("</DL>")
end
%>
</form>