Software /
code /
prosody
Changeset
2838:586893d29eaf
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 | 2837:a17e73ab5f4c |
children | 2839:254f738aecec |
files | util/dataforms.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/dataforms.lua Thu Jan 21 14:53:01 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