diff options
author | Kim Alvefur <zash@zash.se> | 2018-06-27 20:06:13 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-06-27 20:06:13 +0200 |
commit | cecc562ac0f755a234fb82848a388354b0e14989 (patch) | |
tree | 0a6af54d48d2da5084deae9c17acb48e55dc172f /util/dataforms.lua | |
parent | 0a92cbb3721bb24932c38cb261afcbf4e01f6362 (diff) | |
download | prosody-cecc562ac0f755a234fb82848a388354b0e14989.tar.gz prosody-cecc562ac0f755a234fb82848a388354b0e14989.zip |
util.dataforms: Add support for field descriptions in <desc>
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r-- | util/dataforms.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua index 7b832f78..e48f6879 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -38,6 +38,10 @@ function form_t.form(layout, data, formtype) -- Add field tag form:tag("field", { type = field_type, var = field.name, label = field.label }); + if field.desc then + form:text_tag("desc", field.desc); + end + local value = (data and data[field.name]) or field.value; if value then |