summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dnsmasq-config-html.lsp37
1 files changed, 14 insertions, 23 deletions
diff --git a/dnsmasq-config-html.lsp b/dnsmasq-config-html.lsp
index 5af9fcb..6334e6f 100644
--- a/dnsmasq-config-html.lsp
+++ b/dnsmasq-config-html.lsp
@@ -6,39 +6,30 @@ htmlviewfunctions = require("htmlviewfunctions")
viewlibrary.dispatch_component("status")
end %>
-<h1>Config</h1>
-<%
- form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action
- htmlviewfunctions.displayformstart(form)
-%>
-<h2>General Parameters</h2>
<%
+local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Config"}), page_info)
+ htmlviewfunctions.displayformstart(form, page_info)
+local header_level2 = htmlviewfunctions.displaysectionstart(cfe({label="General Parameters"}), page_info, htmlviewfunctions.incrementheader(header_level))
htmlviewfunctions.displayformitem(form.value.interface, "interface")
htmlviewfunctions.displayformitem(form.value.listen_address, "listen_address")
htmlviewfunctions.displayformitem(form.value.domain, "domain")
-%>
-<h2>DNS Settings</h2>
-<h3>DNS Parameters</h3>
-<%
+htmlviewfunctions.displaysectionend(header_level2)
+htmlviewfunctions.displaysectionstart(cfe({label="DNS Settings"}), page_info, header_level2)
+local header_level3 = htmlviewfunctions.displaysectionstart(cfe({label="DNS Parameters"}), page_info, htmlviewfunctions.incrementheader(header_level2))
htmlviewfunctions.displayformitem(form.value.mx_host, "mx_host")
-%>
-
-<h3>DNS Filtering</h3>
-<%
+htmlviewfunctions.displaysectionend(header_level3)
+htmlviewfunctions.displaysectionstart(cfe({label="DNS Filtering"}), page_info, header_level3)
htmlviewfunctions.displayformitem(form.value.dns_filtering, "dns_filtering")
htmlviewfunctions.displayformitem(form.value.dns_whitelist, "dns_whitelist")
htmlviewfunctions.displayformitem(form.value.dns_default_address, "dns_default_address")
-%>
-
-<h2>DHCP Parameters</h2>
-<%
+htmlviewfunctions.displaysectionend(header_level3)
+htmlviewfunctions.displaysectionend(header_level2)
+htmlviewfunctions.displaysectionstart(cfe({label="DHCP Parameters"}), page_info, header_level2)
htmlviewfunctions.displayformitem(form.value.dhcp_range, "dhcp_range")
htmlviewfunctions.displayformitem(form.value.no_dhcp_interface, "no_dhcp_interface")
htmlviewfunctions.displayformitem(form.value.dhcp_host, "dhcp_host")
htmlviewfunctions.displayformitem(form.value.dhcp_option, "dhcp_option")
-%>
-
-<h2>Save Changes</h2>
-<%
- htmlviewfunctions.displayformend(form)
+htmlviewfunctions.displaysectionend(header_level2)
+ htmlviewfunctions.displayformend(form, header_level2)
+htmlviewfunctions.displaysectionend(header_level)
%>