data_forms: Fix FORM_TYPE, <title/> and <instructions/> serialisation.

This commit is contained in:
Emmanuel Gil Peyrot 2017-06-25 20:13:43 +01:00
parent 13e8507848
commit a48565e171

View file

@ -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()
} }