Commit ef81b30f authored by Romain Courteaud's avatar Romain Courteaud

[erp5_xhtml_style] Propagate editable value to the gadget

parent f1085614
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
(!gadget.state.rejected_dict.hasOwnProperty(field_scope))) { (!gadget.state.rejected_dict.hasOwnProperty(field_scope))) {
field_list.push({ field_list.push({
sandbox: field_element.getAttribute("data-gadget-sandbox"), sandbox: field_element.getAttribute("data-gadget-sandbox"),
editable: field_element.getAttribute("data-gadget-editable"), editable: (field_element.getAttribute("data-gadget-editable") !== null),
key: field_element.getAttribute("data-gadget-editable"), key: field_element.getAttribute("data-gadget-editable"),
value: field_element.getAttribute("data-gadget-value") value: field_element.getAttribute("data-gadget-value")
}); });
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
sub_value = field_list[i].value; sub_value = field_list[i].value;
sub_key = field_list[i].key; sub_key = field_list[i].key;
promise_list.push( promise_list.push(
result_list[i].render({key: sub_key, value: sub_value}) result_list[i].render({key: sub_key, value: sub_value, editable: field_list[i].editable})
.push(undefined, displayFieldError) .push(undefined, displayFieldError)
/* XXX Highlight the gadget element with a small colored /* XXX Highlight the gadget element with a small colored
* error message. Clicking on the element could unroll * error message. Clicking on the element could unroll
......
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