Commit 40363716 authored by Romain Courteaud's avatar Romain Courteaud

erp5_hal_json_style: return traversed document translated title

parent e9abea58
...@@ -954,7 +954,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti ...@@ -954,7 +954,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
"script_id": script.id "script_id": script.id
}, },
"name": getRealRelativeUrl(traversed_document), "name": getRealRelativeUrl(traversed_document),
"title": ensureUTF8(traversed_document.getTitle()) "title": ensureUTF8(traversed_document.getTranslatedTitle())
} }
form_relative_url = getFormRelativeUrl(form) form_relative_url = getFormRelativeUrl(form)
...@@ -1322,7 +1322,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None, ...@@ -1322,7 +1322,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
action_dict = {} # actions available on current `traversed_document` action_dict = {} # actions available on current `traversed_document`
last_form_id = None # will point to the previous form so we can obtain previous selection last_form_id = None # will point to the previous form so we can obtain previous selection
result_dict['title'] = ensureUTF8(traversed_document.getTitle()) result_dict['title'] = ensureUTF8(traversed_document.getTranslatedTitle())
# extra_param_json should be base64 encoded JSON at this point # extra_param_json should be base64 encoded JSON at this point
# only for mode == 'form' it is already a dictionary # only for mode == 'form' it is already a dictionary
......
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