diff options
author | Zach LeBar <zach@zachlebar.com> | 2012-03-30 20:54:16 +0000 |
---|---|---|
committer | Zach LeBar <zach@zachlebar.com> | 2012-03-30 20:54:16 +0000 |
commit | 94d2fdb5e7dc424efa0409d2617d3241e4daaa35 (patch) | |
tree | f822bf61b370eb76a5bfe05de1e63a3cc2ef680e /chrony-controller.lua | |
parent | c2efa6165c6ea2b1a8cf0a8bd7995d2094164d7a (diff) | |
download | acf-chrony-94d2fdb5e7dc424efa0409d2617d3241e4daaa35.tar.bz2 acf-chrony-94d2fdb5e7dc424efa0409d2617d3241e4daaa35.tar.xz |
Fixing acf-chrony to work with changes made to acf-core.
Removing the use of controllerfunctions.lua and using the new 'handle_form()' found in acf_www-controller.lua. Also using 'handle_form()' in place of 'redirect_to_referrer()'.
Diffstat (limited to 'chrony-controller.lua')
-rw-r--r-- | chrony-controller.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/chrony-controller.lua b/chrony-controller.lua index 5f135da..16962bb 100644 --- a/chrony-controller.lua +++ b/chrony-controller.lua @@ -1,7 +1,5 @@ module(..., package.seeall) -require("controllerfunctions") - default_action = "status" function status(self) @@ -13,21 +11,21 @@ function details(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.get_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Set") + return self.handle_form(self, self.model.get_config, self.model.update_config, self.clientdata, "Save", "Edit Config", "Configuration Set") end function keyfile(self) - return controllerfunctions.handle_form(self, self.model.get_keyfiledetails, self.model.update_keyfiledetails, self.clientdata, "Save", "Edit Key File", "Key File Saved") + return self.handle_form(self, self.model.get_keyfiledetails, self.model.update_keyfiledetails, self.clientdata, "Save", "Edit Key File", "Key File Saved") end function enablekeyfile(self) - return self:redirect_to_referrer(self.model.enable_keyfile()) + return self.handle_form(self, self.model.get_enable_keyfile, self.model.enable_keyfile, self.clientdata, "Enable", "Enabled Key File", "Enabled key file") end function expert(self) - return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Config File", "Configuration Set") + return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Config File", "Configuration Set") end |