Commit 55b38cc4 authored by Valentin Benozillo's avatar Valentin Benozillo

erp5_web_renderjs_ui: Display in action button: action_title if setup, otherwise title form

parent bcae45dd
......@@ -1154,6 +1154,7 @@ def renderFormDefinition(form, response_dict):
response_dict["title"] = Base_translateString(form.getTitle())
response_dict["pt"] = form.pt
response_dict["action"] = form.action
response_dict["action_title"] = Base_translateString(form.action_title)
response_dict["update_action"] = form.update_action
response_dict["update_action_title"] = Base_translateString(form.update_action_title)
......
......@@ -174,6 +174,7 @@
form_definition: options.form_definition,
erp5_form: options.erp5_form || {},
// editable: true, // ignore global editable state (be always editable)
action_title: options.form_definition.action_title,
has_update_action: Boolean(options.form_definition.update_action),
update_action_title: options.form_definition.update_action_title,
// pass extended_search from previous view in case any gadget is curious
......@@ -254,7 +255,11 @@
]);
})
.push(function (translated_title_list) {
form_gadget.element.querySelector('input.dialogconfirm').value = translated_title_list[1];
var action_confirm = form_gadget.element.querySelector('input.dialogconfirm')
if (form_gadget.state.action_title)
action_confirm.value = form_gadget.state.action_title;
else
action_confirm.value = translated_title_list[1];
selector.textContent = "\u00A0" + translated_title_list[0];
selector.className = "ui-content-title ui-body-c ui-icon ui-icon-custom" + icon;
......
......@@ -208,7 +208,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>georgios.dagkakis</string> </value>
<value> <string>valentin</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -222,7 +222,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>976.52803.20172.15991</string> </value>
<value> <string>978.13676.64074.1365</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -240,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>1562070551.41</float>
<float>1567589301.19</float>
<string>UTC</string>
</tuple>
</state>
......
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