Commit a92ffff8 authored by Sven Franck's avatar Sven Franck

app: allow form widget to be updated (refreshed)

parent 9ce5d9c0
......@@ -1483,21 +1483,28 @@
container = document.createDocumentFragment();
form_id = "form_" + util.uuid();
item_id = spec.data ? (spec.data._id || undefined) : undefined;
form = factory.element({
"type": "form",
"direct": {
"id": form_id,
"method": "POST",
"action": "#",
"className": (spec.class_list || "")
},
"attributes": {"data-ajax": false, "autocomplete": "off"},
"logic": {
"data-reference": spec.reference || null,
"data-depend": spec.depend || null,
"data-reset": spec.reset || null
}
});
if (spec.update) {
form = document.createDocumentFragment();
} else {
form = factory.element({
"type": "form",
"direct": {
"id": form_id,
"method": "POST",
"action": "#",
"className": (spec.class_list || "")
},
"attributes": {
"data-ajax": false,
"autocomplete": "off",
"data-widget": "form"
},
"logic": {
"data-reference": spec.reference || null,
"data-map": spec.map_children || null
}
});
}
// NOTE: needed to differentiate between PUT/POST
// TODO: block_identifier is only used for release_install, find better!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment