From 0fe7d43751d2525518fbcdf7fc925a34e02c63bc Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Wed, 31 Aug 2022 13:04:21 +0000 Subject: [PATCH] erp5_hal_json_style: XXX hack to edit web site/section --- .../erp5_hal_json_style/ERP5Document_getHateoas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py index 046a5ad64c..14e93e1d09 100644 --- a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py +++ b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py @@ -301,7 +301,7 @@ def selectKwargsForCallable(func, initial_kwargs, kwargs_dict): url_template_dict = { - "form_action": "%(traversed_document_url)s/%(action_id)s", + "form_action": "%(traversed_document_url)s/%(action_id)s?portal_skin=HalRestricted", "traverse_generator": "%(root_url)s/%(script_id)s?mode=traverse" + \ "&relative_url=%(relative_url)s&view=%(view)s", "traverse_generator_action": "%(root_url)s/%(script_id)s?mode=traverse" + \ @@ -2414,6 +2414,7 @@ is_web_mode = (context.REQUEST.get('current_web_section', None) is not None) or # is_web_mode = traversed_document.isWebMode() if is_web_mode: site_root = context.getWebSectionValue() + site_root = portal.web_site_module.renderjs_runner.hateoas view_action_type = site_root.getLayoutProperty("configuration_view_action_category", default='object_view') else: site_root = portal -- 2.30.9