Software /
code /
prosody
Changeset
2488:08bfd7c96531
util.dataforms: Add optional type parameters (defaults to 'form')
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Jan 2010 14:58:31 +0000 |
parents | 2487:d9db41109ba0 |
children | 2489:d8296ab96f55 |
files | util/dataforms.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dataforms.lua Fri Jan 22 14:48:30 2010 +0000 +++ b/util/dataforms.lua Fri Jan 22 14:58:31 2010 +0000 @@ -23,8 +23,8 @@ 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