summaryrefslogtreecommitdiffstats
path: root/modules-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules-controller.lua')
-rw-r--r--modules-controller.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules-controller.lua b/modules-controller.lua
new file mode 100644
index 0000000..f1da11c
--- /dev/null
+++ b/modules-controller.lua
@@ -0,0 +1,14 @@
+-- the interfaces controller
+require("controllerfunctions")
+
+module (..., package.seeall)
+
+default_action = "edit"
+
+edit = function(self)
+ return controllerfunctions.handle_form(self, self.model.read_file, self.model.write_file, self.clientdata, "Save", "Edit Modules file", "File saved")
+end
+
+reload = function(self)
+ return self:redirect_to_referrer(self.model.reloadmodules())
+end