diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:59:46 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-18 01:59:46 +0000 |
commit | 4f4f76cfc6b94576ea6726fdf8fa3ba55d3562f8 (patch) | |
tree | 78efab927b97e5cb0bb6b6ab9d71b9750bf2cf3f /tinydns-controller.lua | |
parent | 5889c64ccb04e1a1027d6cc7a4e748d095725397 (diff) | |
download | acf-tinydns-4f4f76cfc6b94576ea6726fdf8fa3ba55d3562f8.tar.bz2 acf-tinydns-4f4f76cfc6b94576ea6726fdf8fa3ba55d3562f8.tar.xz |
Started work on updating for acf-core-0.15
Removed controllerfunctions library (still needs more work and corresponding work in model)
Updated startstop functionality and deleted view
Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries
Diffstat (limited to 'tinydns-controller.lua')
-rw-r--r-- | tinydns-controller.lua | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tinydns-controller.lua b/tinydns-controller.lua index 64a224c..25a0c12 100644 --- a/tinydns-controller.lua +++ b/tinydns-controller.lua @@ -1,6 +1,5 @@ module(..., package.seeall) -require("controllerfunctions") -require("validator") +validator = require("acf.validator") mvc = {} mvc.on_load = function(self, parent) @@ -18,15 +17,15 @@ function view(self) end function startstop(self) - return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata) + return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end function config(self) - return controllerfunctions.handle_form(self, self.model.getconfig, function(value) return self.model.setconfig(self, value) end, self.clientdata, "Save", "Edit Configuration", "Configuration Saved") + return self.handle_form(self, self.model.getconfig, function(value) return self.model.setconfig(self, value) end, self.clientdata, "Save", "Edit Configuration", "Configuration Saved") end function newfile(self) - return controllerfunctions.handle_form(self, self.model.getnewconfigfile, function(value) + return self.handle_form(self, self.model.getnewconfigfile, function(value) return self.model.createconfigfile(self, value, sessiondata.userinfo.userid) end, self.clientdata, "Create", "Create New Config File", "Config File Created") end @@ -47,7 +46,7 @@ function edit(self) end function editfile(self) - config = controllerfunctions.handle_form(self, function() + config = self.handle_form(self, function() return self.model.get_filedetails(self, self.clientdata.filename, sessiondata.userinfo.userid) end, function(value) return self.model.set_filedetails(self, value, sessiondata.userinfo.userid) @@ -68,7 +67,7 @@ function listpermissions(self) end function edituserpermissions(self) - return controllerfunctions.handle_form(self, function() + return self.handle_form(self, function() return self.model:getuserpermissions(self.clientdata.userid) end, function(value) return self.model:setuserpermissions(value) @@ -76,7 +75,7 @@ function edituserpermissions(self) end function editrolepermissions(self) - return controllerfunctions.handle_form(self, function() + return self.handle_form(self, function() return self.model:getrolepermissions(self.clientdata.role) end, function(value) return self.model:setrolepermissions(value) |