From 0874f88bc25066248c28b16d3bbf1ab5cd1f2611 Mon Sep 17 00:00:00 2001 From: Zach LeBar Date: Wed, 21 Mar 2012 15:06:32 +0000 Subject: Change all -controller.lua files to use new handle_form() functions found in acf_www-controller.lua instead of the controllerfunctions.lua version and also instead of redirect_to_referrer(). Made corresponding changes to vmail-model .lua to make everything work. --- modules-model.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules-model.lua') diff --git a/modules-model.lua b/modules-model.lua index a21a46b..c5b1a39 100644 --- a/modules-model.lua +++ b/modules-model.lua @@ -20,7 +20,15 @@ function write_file(filedetails) return modelfunctions.setfiledetails(filedetails, {configfile}) end -function reloadmodules() - local retval = modelfunctions.startstop_service("modules", "restart", {"restart"}) - return retval.value.result +function get_reloadmodules(clientdata) + local actions = {} + actions[1] = "restart" + local service = cfe({ type="hidden", value="modules", label="Service Name" }) + local startstop = cfe({ type="group", label="Reload Modules", value={servicename=service}, option=actions, errtxt=errtxt }) + + return startstop +end + +function reloadmodules(startstop) + return modelfunctions.startstop_service(startstop, "restart") end -- cgit v1.2.3