luci-app-wman3: add license header to all files
[project/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / notify.lua
index 8746072..6f87a3d 100644 (file)
@@ -1,11 +1,13 @@
--- ------ hotplug script configuration ------ --
-
-fs = require "nixio.fs"
-ut = require "luci.util"
+-- Copyright 2014 Aedan Renner <chipdankly@gmail.com>
+-- Copyright 2018 Florian Eckert <fe@dev.tdt.de>
+-- Licensed to the public under the GNU General Public License v2.
 
+local fs = require "nixio.fs"
+local ut = require "luci.util"
 script = "/etc/mwan3.user"
 
-m5 = SimpleForm("luci", nil)
+
+m5 = SimpleForm("luci", translate("MWAN - Notification"))
 
 f = m5:section(SimpleSection, nil,
        translate("This section allows you to modify the content of \"/etc/mwan3.user\".<br />" ..
@@ -27,13 +29,13 @@ f = m5:section(SimpleSection, nil,
        "<br />"))
 
 t = f:option(TextValue, "lines")
-       t.rmempty = true
-       t.rows = 20
-       function t.cfgvalue()
-               return fs.readfile(script)
-       end
-       function t.write(self, section, data) -- format and write new data to script
-               return fs.writefile(script, ut.trim(data:gsub("\r\n", "\n")) .. "\n")
-       end
+t.rmempty = true
+t.rows = 20
+function t.cfgvalue()
+       return fs.readfile(script)
+end
+function t.write(self, section, data)
+       return fs.writefile(script, ut.trim(data:gsub("\r\n", "\n")) .. "\n")
+end
 
 return m5