Fix request template regression : after selecting template no form displayed anymore

Caused by invalid returned JSON
This bug was introduced by adcd0eb9
This commit is contained in:
Pierre Goiffon
2023-04-18 12:19:00 +02:00
parent 3e454de77e
commit b9833f26e8

View File

@@ -2435,7 +2435,7 @@ EOF
break;
case 'custom_fields_update':
$oPage->SetContentType('application/json');
$oPage = new JsonPage();
$sAttCode = utils::ReadParam('attcode', '');
$aRequestedFields = utils::ReadParam('requested_fields', array());
$sRequestedFieldsFormPath = utils::ReadParam('form_path', '');
@@ -2459,7 +2459,8 @@ EOF
catch (Exception $e) {
$aResult['error'] = $e->getMessage();
}
$oPage->add(json_encode($aResult));
$oPage->SetData($aResult);
$oPage->SetOutputDataOnly(true);
break;
//--------------------------------