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 | 8714ac8f2ae1f4f039b6a25b7a3ef38e1e6d69f5 (patch) | |
tree | 0a6af54d48d2da5084deae9c17acb48e55dc172f /util/dataforms.lua | |
parent | aa76e7bfc17e523b57a355b722f25f31f06c24a9 (diff) | |
download | prosody-8714ac8f2ae1f4f039b6a25b7a3ef38e1e6d69f5.tar.gz prosody-8714ac8f2ae1f4f039b6a25b7a3ef38e1e6d69f5.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 |