1 -- Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
2 -- Licensed to the public under the Apache License 2.0.
4 local map, section = ...
5 local utl = require "luci.util"
6 local fs = require "nixio.fs"
7 local file = "/usr/share/customtext/" .. arg[1] .. ".html"
9 local form, ferr = loadfile(utl.libpath() .. "/model/cbi/freifunk/widgets/heightwidth.lua")
11 setfenv(form, getfenv(1))(m, wdg)
14 t = wdg:option(TextValue, "_text")
20 return fs.readfile(file) or ""
23 function t.write(self, section, value)
24 return fs.writefile(file, value)
27 function t.remove(self, section)
28 return fs.unlink(file)