data_forms: Fix FORM_TYPE, <title/> and <instructions/> serialisation.
This commit is contained in:
parent
13e8507848
commit
a48565e171
1 changed files with 2 additions and 3 deletions
|
@ -229,9 +229,8 @@ impl From<DataForm> for Element {
|
||||||
Element::builder("x")
|
Element::builder("x")
|
||||||
.ns(ns::DATA_FORMS)
|
.ns(ns::DATA_FORMS)
|
||||||
.attr("type", form.type_)
|
.attr("type", form.type_)
|
||||||
.append(form.form_type)
|
.append(if form.title.is_some() { Some(Element::builder("title").ns(ns::DATA_FORMS).append(form.title)) } else { None })
|
||||||
.append(form.title)
|
.append(if form.instructions.is_some() { Some(Element::builder("instructions").ns(ns::DATA_FORMS).append(form.instructions)) } else { None })
|
||||||
.append(form.instructions)
|
|
||||||
.append(form.fields)
|
.append(form.fields)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue