changeset 920:f183de41b7c6

mod_incidents_handling: "cancel" action doesn't need to be specified, suppresses a (harmless) log error.
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 05 Mar 2013 01:10:08 +0100 (2013-03-05)
parents 7d72fb45b1e4
children ef859c9d42c4
files mod_incidents_handling/incidents_handling/mod_incidents_handling.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_incidents_handling/incidents_handling/mod_incidents_handling.lua	Mon Mar 04 14:27:04 2013 +0100
+++ b/mod_incidents_handling/incidents_handling/mod_incidents_handling.lua	Tue Mar 05 01:10:08 2013 +0100
@@ -216,7 +216,7 @@
 			if data.action == "cancel" then 
 				return { status = "canceled" }
 			elseif data.action == "prev" then
-				return { status = "executing", actions = { "next", "cancel", default = "next" }, form = list_incidents_layout }, {}
+				return { status = "executing", actions = { "next", default = "next" }, form = list_incidents_layout }, {}
 			end
 
 			local single_incident_layout = state.form_layout
@@ -237,13 +237,13 @@
 
 			if fields.ids then
 				local single_incident_layout = ih_lib.render_single(incidents[fields.ids])
-				return { status = "executing", actions = { "prev", "cancel", "complete", default = "complete" }, form = single_incident_layout }, { step = 1, form_layout = single_incident_layout, id = fields.ids }
+				return { status = "executing", actions = { "prev", "complete", default = "complete" }, form = single_incident_layout }, { step = 1, form_layout = single_incident_layout, id = fields.ids }
 			else
 				return { status = "completed", error = { message = "You need to select the report ID to continue." } }
 			end
 		end
 	else
-		return { status = "executing", actions = { "next", "cancel", default = "next" }, form = list_incidents_layout }, {}
+		return { status = "executing", actions = { "next", default = "next" }, form = list_incidents_layout }, {}
 	end
 end