comparison src/plugins/plugin_exp_pubsub_schema.py @ 2381:72c30e73a9a5

plugin schema: use new "prepend" argument to put "id" widget first.
author Goffi <goffi@goffi.org>
date Mon, 16 Oct 2017 07:36:41 +0200
parents 3704cb959ae8
children 2e05921df16a
comparison
equal deleted inserted replaced
2380:59636c4db2d0 2381:72c30e73a9a5
226 for item_elt in items: 226 for item_elt in items:
227 for x_elt in item_elt.elements((data_form.NS_X_DATA, u'x')): 227 for x_elt in item_elt.elements((data_form.NS_X_DATA, u'x')):
228 form = data_form.Form.fromElement(x_elt) 228 form = data_form.Form.fromElement(x_elt)
229 if form_ns and form.formNamespace != form_ns: 229 if form_ns and form.formNamespace != form_ns:
230 continue 230 continue
231 xmlui = xml_tools.dataFormResult2XMLUI(form, schema_form) 231 xmlui = xml_tools.dataFormResult2XMLUI(
232 xmlui.addLabel('id') 232 form,
233 xmlui.addText(item_elt['id'], name='id') 233 schema_form,
234 prepend = (('label', 'id'),('text', item_elt['id'], u'id'))
235 )
234 items_xmlui.append(xmlui) 236 items_xmlui.append(xmlui)
235 break 237 break
236 defer.returnValue((items_xmlui, metadata)) 238 defer.returnValue((items_xmlui, metadata))
237 239
238 240