Commit 80f25c72 authored by Ted Trask's avatar Ted Trask

Started work on updating for acf-core-0.15

Removed controllerfunctions library (still needs more work and corresponding work in model)
Updated for viewfunctions to htmlviewfunctions and modified require statements for acf libraries
parent b040b787
<% local view, viewlibrary, page_info, session = ... %>
<% require("viewfunctions") %>
<% require("htmlviewfunctions") %>
<% displaycommandresults({"editconfig", "editentry", "deleteentry", "createentry"}, session) %>
<% htmlviewfunctions.displaycommandresults({"editconfig", "editentry", "deleteentry", "createentry"}, session) %>
<% if viewlibrary and viewlibrary.dispatch_component then
viewlibrary.dispatch_component("status")
......
module(..., package.seeall)
require("controllerfunctions")
default_action = "status"
function status(self)
......@@ -9,15 +7,15 @@ function status(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 editconfig(self)
return controllerfunctions.handle_form(self, self.model.getconfig, self.model.updateconfig, self.clientdata, "Save", "Edit Config", "Configuration Set")
return self.handle_form(self, self.model.getconfig, self.model.updateconfig, self.clientdata, "Save", "Edit Config", "Configuration Set")
end
function expert(self)
return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filecontent, self.clientdata, "Save", "Edit Config", "Configuration Set")
return self.handle_form(self, self.model.get_filedetails, self.model.update_filecontent, self.clientdata, "Save", "Edit Config", "Configuration Set")
end
function listentries(self)
......@@ -25,11 +23,11 @@ function listentries(self)
end
function editentry(self)
return controllerfunctions.handle_form(self, function() return self.model.readentry(self.clientdata.entry, self.clientdata.method, self.clientdata.remotemailbox, self.clientdata.localdomain) end, self.model.updateentry, self.clientdata, "Save", "Edit Entry", "Entry Saved")
return self.handle_form(self, function() return self.model.readentry(self.clientdata.entry, self.clientdata.method, self.clientdata.remotemailbox, self.clientdata.localdomain) end, self.model.updateentry, self.clientdata, "Save", "Edit Entry", "Entry Saved")
end
function createentry(self)
return controllerfunctions.handle_form(self, self.model.readentry, self.model.createentry, self.clientdata, "Create", "Create Entry", "Entry Created")
return self.handle_form(self, self.model.readentry, self.model.createentry, self.clientdata, "Create", "Create Entry", "Entry Created")
end
function deleteentry(self)
......
<% local form, viewlibrary, page_info = ...
require("viewfunctions")
require("htmlviewfunctions")
%>
<H1><%= html.html_escape(form.label) %></H1>
......@@ -13,5 +13,5 @@ require("viewfunctions")
form.value.localdomain.readonly = true
end
local order = { "remotehost", "enabled", "method", "remotemailbox", "remotepassword", "ssl", "localhost", "localmailbox", "localdomain", "envelope" }
displayform(form, order)
htmlviewfunctions.displayform(form, order)
%>
<% local data, viewlibrary, page_info, session = ...
require("viewfunctions")
require("htmlviewfunctions")
%>
<% displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %>
<% htmlviewfunctions.displaycommandresults({"editentry", "deleteentry", "createentry"}, session) %>
<h1>Edit/View Fetchmail Entries</h1>
<DL>
......
......@@ -3,9 +3,9 @@ module(..., package.seeall)
-- Load libraries
require("modelfunctions")
require("posix")
require("fs")
require("format")
require("validator")
fs = require("acf.fs")
format = require("acf.format")
validator = require("acf.validator")
-- Set variables
local packagename = "fetchmail"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment