From f80585f35478b8c9852a59cf2d8f28c0e12586a1 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 22 Jan 2010 14:58:31 +0000 Subject: util.dataforms: Add optional type parameters (defaults to 'form') --- util/dataforms.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/dataforms.lua b/util/dataforms.lua index a3bde8ca..56671347 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -23,8 +23,8 @@ function new(layout) return setmetatable(layout, form_mt); end -function form_t.form(layout, data) - local form = st.stanza("x", { xmlns = xmlns_forms, type = "form" }); +function form_t.form(layout, data, formtype) + local form = st.stanza("x", { xmlns = xmlns_forms, type = formtype or "form" }); if layout.title then form:tag("title"):text(layout.title):up(); end -- cgit v1.2.3