util/dataforms.lua
changeset 9092 3a7a0b9f42f3
parent 9091 aa1b02411846
child 9093 56c52cb4d44e
--- a/util/dataforms.lua	Fri Aug 03 21:05:48 2018 +0200
+++ b/util/dataforms.lua	Fri Aug 03 21:06:59 2018 +0200
@@ -28,6 +28,9 @@
 function form_t.form(layout, data, formtype)
 	if not formtype then formtype = "form" end
 	local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype });
+	if formtype == "cancel" then
+		return form;
+	end
 	if layout.title then
 		form:tag("title"):text(layout.title):up();
 	end