iptables-editrule-html.lsp 2.52 KB
Newer Older
Ted Trask's avatar
Ted Trask committed
1
<% local form, viewlibrary, page_info = ...
2
htmlviewfunctions = require("htmlviewfunctions")
3
html = require("acf.html")
4 5
%>

Ted Trask's avatar
Ted Trask committed
6
<%
7 8
local header_level = htmlviewfunctions.displaysectionstart(form, page_info)
local header_level2 = htmlviewfunctions.incrementheader(header_level)
9
for name,val in pairs(form.value) do val.name = name end
10
form.value.table.readonly = true
11
form.value.table.type = "text"
12 13
form.value.chain.readonly = true
form.value.position.readonly = true
14
htmlviewfunctions.displayformstart(form, page_info)
15

16
htmlviewfunctions.displaysectionstart(cfe({label="Rule Identification"}), page_info, header_level2)
17 18 19
htmlviewfunctions.displayformitem(form.value.table)
htmlviewfunctions.displayformitem(form.value.chain)
htmlviewfunctions.displayformitem(form.value.position)
20 21 22
htmlviewfunctions.displaysectionend(header_level2)

htmlviewfunctions.displaysectionstart(cfe({label="Basic Parameters"}), page_info, header_level2)
23 24 25 26 27 28
htmlviewfunctions.displayformitem(form.value.jump)
htmlviewfunctions.displayformitem(form.value.protocol)
htmlviewfunctions.displayformitem(form.value.in_interface)
htmlviewfunctions.displayformitem(form.value.out_interface)
htmlviewfunctions.displayformitem(form.value.source)
htmlviewfunctions.displayformitem(form.value.destination)
29
htmlviewfunctions.displayformitem(form.value["goto"])
30 31
htmlviewfunctions.displayformitem(form.value.fragment)
htmlviewfunctions.displayformitem(form.value.set_counters)
32 33 34
htmlviewfunctions.displaysectionend(header_level2)

htmlviewfunctions.displaysectionstart(cfe({label="Extended Parameters"}), page_info, header_level2)
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
htmlviewfunctions.displayformitem(form.value.comment)
htmlviewfunctions.displayformitem(form.value.addrtype_src_type)
htmlviewfunctions.displayformitem(form.value.addrtype_dst_type)
htmlviewfunctions.displayformitem(form.value.icmp_type)
htmlviewfunctions.displayformitem(form.value.src_range)
htmlviewfunctions.displayformitem(form.value.dst_range)
htmlviewfunctions.displayformitem(form.value.mac_source)
htmlviewfunctions.displayformitem(form.value.sports)
htmlviewfunctions.displayformitem(form.value.dports)
htmlviewfunctions.displayformitem(form.value.ports)
htmlviewfunctions.displayformitem(form.value.state)
htmlviewfunctions.displayformitem(form.value.tcp_sport)
htmlviewfunctions.displayformitem(form.value.tcp_dport)
htmlviewfunctions.displayformitem(form.value.udp_sport)
htmlviewfunctions.displayformitem(form.value.udp_dport)
50 51 52 53
htmlviewfunctions.displaysectionend(header_level2)

htmlviewfunctions.displayformend(form, header_level2)
htmlviewfunctions.displaysectionend(header_level)
54
%>