1 local fs = require "nixio.fs"
2 local file = "/www/luci-static/index_user.html"
4 m = Map("freifunk", translate("Edit index page"), translate("You can display additional content on the public index page by inserting valid XHTML in the form below.<br />Headlines should be enclosed between <h2> and </h2>."))
6 s = m:section(NamedSection, "community", "public", "")
9 di = s:option(Flag, "DefaultText", translate("Disable default content"), translate("If selected then the default content element is not shown."))
10 di.enabled = "disabled"
11 di.disabled = "enabled"
14 t = s:option(TextValue, "_text")
19 return fs.readfile(file) or ""
22 function t.write(self, section, value)
23 return fs.writefile(file, value)
26 function t.remove(self, section)
27 return fs.unlink(file)