Merge Zash->trunk
[prosody.git] / util / dataforms.lua
index a3bde8caab1c8879965efef52a9b42a715b03a2c..5a3b1fb5652c969fb1cc5e329dcae8dbca04613d 100644 (file)
@@ -1,6 +1,6 @@
 -- Prosody IM
--- Copyright (C) 2008-2009 Matthew Wild
--- Copyright (C) 2008-2009 Waqas Hussain
+-- Copyright (C) 2008-2010 Matthew Wild
+-- Copyright (C) 2008-2010 Waqas Hussain
 -- 
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
@@ -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