Commit f277d0e1 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 2b7deda1
module(..., package.seeall)
-- Load libraries
require("controllerfunctions")
default_action = "status"
function status(self)
......@@ -10,11 +7,11 @@ function status(self)
end
function editpap(self)
return controllerfunctions.handle_form(self, self.model.read_papfiledetails, self.model.update_papfiledetails, self.clientdata, "Save", "Edit Config", "Configuration Set")
return self.handle_form(self, self.model.read_papfiledetails, self.model.update_papfiledetails, self.clientdata, "Save", "Edit Config", "Configuration Set")
end
function editchap(self)
return controllerfunctions.handle_form(self, self.model.read_chapfiledetails, self.model.update_chapfiledetails, self.clientdata, "Save", "Edit Config", "Configuration Set")
return self.handle_form(self, self.model.read_chapfiledetails, self.model.update_chapfiledetails, self.clientdata, "Save", "Edit Config", "Configuration Set")
end
function listpeers(self)
......@@ -22,7 +19,7 @@ function listpeers(self)
end
function createpeer(self)
return controllerfunctions.handle_form(self, self.model.get_newpeer, self.model.create_peer, self.clientdata, "Create", "Create New Peer File", "Peer File Created")
return self.handle_form(self, self.model.get_newpeer, self.model.create_peer, self.clientdata, "Create", "Create New Peer File", "Peer File Created")
end
function deletepeer(self)
......@@ -30,5 +27,5 @@ function deletepeer(self)
end
function editpeer(self)
return controllerfunctions.handle_form(self, function() return self.model.read_peerfile(self.clientdata.name) end, self.model.update_peerfile, self.clientdata, "Save", "Edit PPP Peer", "Peer Configuration Set")
return self.handle_form(self, function() return self.model.read_peerfile(self.clientdata.name) end, self.model.update_peerfile, self.clientdata, "Save", "Edit PPP Peer", "Peer Configuration Set")
end
<% local data, viewlibrary = ...
require("viewfunctions")
%>
<% viewlibrary.dispatch_component("status") %>
<% viewlibrary.dispatch_component("editpap") %>
<% viewlibrary.dispatch_component("editchap") %>
<% local form, viewlibrary, page_info, session = ...
require("viewfunctions")
require("htmlviewfunctions")
%>
<% displaycommandresults({"deletepeer", "editpeer"}, session) %>
<% displaycommandresults({"createpeer"}, session, true) %>
<% htmlviewfunctions.displaycommandresults({"deletepeer", "editpeer"}, session) %>
<% htmlviewfunctions.displaycommandresults({"createpeer"}, session, true) %>
<h1>Peer Files</h1>
<DL><TABLE>
......
......@@ -2,9 +2,9 @@ module(..., package.seeall)
-- Load libraries
require("modelfunctions")
require("processinfo")
require("fs")
require("validator")
processinfo = require("acf.processinfo")
fs = require("acf.fs")
validator = require("acf.validator")
-- Set variables
local processname = "pppd"
......
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