1 local map, section = ...
2 local utl = require "luci.util"
3 local fs = require "nixio.fs"
4 local file = "/usr/share/customtext/" .. arg[1] .. ".html"
6 local form, ferr = loadfile(utl.libpath() .. "/model/cbi/freifunk/widgets/heightwidth.lua")
8 setfenv(form, getfenv(1))(m, wdg)
11 t = wdg:option(TextValue, "_text")
17 return fs.readfile(file) or ""
20 function t.write(self, section, value)
21 return fs.writefile(file, value)
24 function t.remove(self, section)
25 return fs.unlink(file)