X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;ds=sidebyside;f=util%2Fdataforms.lua;h=b2988ae7e5a99df56d6c86d80bcf024086f31cbd;hb=e59d6ea986ec9c67fdda12f1861ed430ec2ea591;hp=ee37157a48f268615721c9a99fa0b3b8d103d755;hpb=a1a14b4a5465a79021c94330a3949f1d4226db2b;p=prosody.git diff --git a/util/dataforms.lua b/util/dataforms.lua index ee37157a..b2988ae7 100644 --- a/util/dataforms.lua +++ b/util/dataforms.lua @@ -1,7 +1,7 @@ -- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain --- +-- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- @@ -38,7 +38,7 @@ function form_t.form(layout, data, formtype) form:tag("field", { type = field_type, var = field.name, label = field.label }); local value = (data and data[field.name]) or field.value; - + if value then -- Add value, depending on type if field_type == "hidden" then @@ -102,11 +102,11 @@ function form_t.form(layout, data, formtype) end form:up(); end - + if field.required then form:tag("required"):up(); end - + -- Jump back up to list of fields form:up(); end