summaryrefslogtreecommitdiffstats
path: root/freeswitch-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-08-25 10:26:36 +0000
committerTed Trask <ttrask01@yahoo.com>2010-08-25 10:26:36 +0000
commitb7f8f377687d5d898cdd581d8d5de44ae95ab7a0 (patch)
treecf494d6e7f54949cee64bb9186949d26765102ad /freeswitch-controller.lua
parent9a0f90972bf1fe723caa55fecb684788933679b9 (diff)
downloadacf-freeswitch-b7f8f377687d5d898cdd581d8d5de44ae95ab7a0.tar.bz2
acf-freeswitch-b7f8f377687d5d898cdd581d8d5de44ae95ab7a0.tar.xz
Added ability to create and delete configuration files.
Changed edit action to editfile.
Diffstat (limited to 'freeswitch-controller.lua')
-rw-r--r--freeswitch-controller.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/freeswitch-controller.lua b/freeswitch-controller.lua
index 04d6ea7..6b459cd 100644
--- a/freeswitch-controller.lua
+++ b/freeswitch-controller.lua
@@ -16,6 +16,14 @@ listfiles = function( self )
return self.model.list_files()
end
-edit = function( self )
+editfile = function( self )
return controllerfunctions.handle_form(self, function() return self.model.get_file(self.clientdata.filename) end, self.model.update_file, self.clientdata, "Save", "Edit File", "File Saved")
end
+
+function createfile(self)
+ return controllerfunctions.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create New Freeswitch File", "Freeswitch File Created")
+end
+
+function deletefile(self)
+ return self:redirect_to_referrer(self.model.deletefile(self.clientdata.filename))
+end