diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-01-22 14:58:31 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-01-22 14:58:31 +0000 |
commit | f80585f35478b8c9852a59cf2d8f28c0e12586a1 (patch) | |
tree | 9359b0fc6c493d59c71e29f484a3555e1234d2f7 | |
parent | c103c2bb6b528a64b032e55cfb97d0f41dbf695d (diff) | |
download | prosody-f80585f35478b8c9852a59cf2d8f28c0e12586a1.tar.gz prosody-f80585f35478b8c9852a59cf2d8f28c0e12586a1.zip |
util.dataforms: Add optional type parameters (defaults to 'form')
-rw-r--r-- | util/dataforms.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 |