Fix freeze after choosing request template form to display

When having multiple request template for the same service, you have to choose first which template to fill.
After choosing from the drop down the form was reset and nothing displayed, with an error server side.

Regression introduced in 82d2ac66
This commit is contained in:
Pierre Goiffon
2023-04-04 18:33:37 +02:00
parent 5fbd49d386
commit fe670fa1dd

View File

@@ -13155,7 +13155,7 @@ class AttributeCustomFields extends AttributeDefinition
try {
$oValue = $oHostObject->Get($this->GetCode());
$oHandler = $this->GetHandler($oValue->GetValues());
$sFormId = is_null($sFormPrefix) ? 'cf_'.$this->GetCode() : $sFormPrefix.'_cf_'.$this->GetCode();
$sFormId = utils::IsNullOrEmptyString($sFormPrefix) ? 'cf_'.$this->GetCode() : $sFormPrefix.'_cf_'.$this->GetCode();
$oHandler->BuildForm($oHostObject, $sFormId);
$oForm = $oHandler->GetForm();
}