mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 00:32:16 +02:00
Merge branch 'support/3.2' into develop
# Conflicts: # addons/userrights/userrightsprofile.db.class.inc.php # addons/userrights/userrightsprojection.class.inc.php # datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss
This commit is contained in:
@@ -337,7 +337,18 @@ class ObjectFormHandlerHelper
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, implode('<br/>', $aFormData['validation']['messages']['error']['_main']));
|
||||
$sErrorMessages = '';
|
||||
foreach ($aFormData['validation']['messages']['error'] as $sFieldId => $aMessages) {
|
||||
if ($sFieldId == '_main') {
|
||||
$sErrorMessages .= implode(' - ', $aFormData['validation']['messages']['error']['_main']);
|
||||
} else {
|
||||
$oObj = $oFormManager->GetObject();
|
||||
$sLabel = $oObj->GetLabel($sFieldId);
|
||||
$sErrorMessages .= Dict::Format('Portal:Error:CheckToWriteFailed', $sLabel, (is_array($aMessages) ? implode(' - ', $aMessages) : $aMessages));
|
||||
}
|
||||
}
|
||||
|
||||
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, $sErrorMessages);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user