Commit 5a5323d2 authored by Yusei Tahara's avatar Yusei Tahara

erp5_web_renderjs_ui: Fix listbox gadget. If select column is displayed, send only checked uids.

parent e559ecd5
......@@ -1247,7 +1247,20 @@
}
return queue
.push(function () {
var all_hide_element_list = form_gadget.element.querySelectorAll('.hide_element'),
checked_uid_list = [],
i;
if (all_hide_element_list.length === 0) {
data[form_gadget.props.listbox_uid_dict.key] = form_gadget.props.listbox_uid_dict.value;
} else {
for (i = 0; i < all_hide_element_list.length; i += 1) {
if (all_hide_element_list[i].checked) {
checked_uid_list.push(all_hide_element_list[i].getAttribute("data-uid"));
}
}
data[form_gadget.props.listbox_uid_dict.key] = checked_uid_list;
}
if (form_gadget.props.listbox_query_param_json !== undefined) {
// JSON query parameters are only sent when rendering an ERP5 Form
data[form_gadget.props.listbox_query_param_json.key] =
......
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