mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°8663 - DoCheckToWrite fonction implode()
This commit is contained in:
@@ -61,6 +61,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array(
|
||||
'Portal:Form:Close:Warning' => 'Opravdu chcete opustit tento formulář? Data vložená do formuláře budou ztracena ',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Chyba: objekt nelze vytvořit. Před opětovným odesláním tohoto formuláře zkontrolujte související objekty a přílohy.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Chyba: objekt nelze vytvořit. Před opětovným odesláním tohoto formuláře zkontrolujte související objekty a přílohy.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
|
||||
'Portal:Form:Close:Warning' => 'Soll diese Eingabemaske verlassen werden? Eingegebene Daten werden nicht gespeichert.',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: Objekt kann nicht erzeugt werden. Prüfen Sie verknüpfte Objekte und Anhänge bevor Sie dieses Formular erneut abschicken.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: Objekt kann nicht geupdated werden. Prüfen Sie verknüpfte Objekte und Anhänge bevor Sie dieses Formular erneut abschicken.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -70,6 +70,7 @@ Dict::Add('EN US', 'English', 'English', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -57,6 +57,7 @@ Dict::Add('EN GB', 'British English', 'British English', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -59,6 +59,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellano', array(
|
||||
'Portal:Form:Close:Warning' => '¿Desea abandorar este formulario? Datos modificados se perderan',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: no se puede crear el objeto. Verifique los objetos asociados y archivos adjuntos antes de enviar nuevamente este formulario.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: no se puede actualizar el objeto. Verifique los objetos asociados y archivos adjuntos antes de enviar nuevamente este formulario.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
|
||||
'Portal:Form:Close:Warning' => 'Voulez-vous quitter ce formulaire ? Les données saisies seront perdues',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Erreur: L\'objet n\'a pas été créé. Vérifiez les objets liés et les attachements avant de soumettre à nouveau le formulaire.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Erreur: L\'objet n\'a pas été modifié. Vérifiez les objets liés et les attachements avant de soumettre à nouveau le formulaire.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Erreur durant la validation du champ \'%1$s\' : %2$s',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array(
|
||||
'Portal:Form:Close:Warning' => 'Szeretné elhagyni ezt az űrlapot? A megadott adatok elveszhetnek',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Hiba: az objektum nem hozható létre. Ellenőrizze a kapcsolódó objektumokat és mellékleteket, mielőtt újra elküldi ezt az űrlapot.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Hiba: az objektum nem frissíthető. Ellenőrizze a kapcsolódó objektumokat és mellékleteket, mielőtt újra elküldi ezt az űrlapot.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -62,6 +62,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array(
|
||||
'Portal:Form:Close:Warning' => 'Ben je zeker dat je dit venster wil sluiten? Ingevoerde gegevens kunnen verloren gaan.',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Fout: object kan niet worden aangemaakt. Kijk verwante objecten en bijlagen na vooraleer dit formulier opnieuw te versturen.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Fout: object kan niet worden aangepast. Kijk verwante objecten en bijlagen na vooraleer dit formulier opnieuw te versturen.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('PL PL', 'Polish', 'Polski', array(
|
||||
'Portal:Form:Close:Warning' => 'Chcesz opuścić ten formularz? Wprowadzone dane mogą zostać utracone',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Błąd: nie można utworzyć obiektu. Sprawdź powiązane obiekty i załączniki przed ponownym przesłaniem tego formularza.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Błąd: nie można zaktualizować obiektu. Sprawdź powiązane obiekty i załączniki przed ponownym przesłaniem tego formularza.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array(
|
||||
'Portal:Form:Close:Warning' => 'Você deseja abandonar esta página? Os dados digitados podem ser perdidos',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Erro: objeto não pode ser criado. Verifique os objetos e anexos associados antes de enviar novamente este formulário',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Erro: objeto não pode ser atualizado. Verifique os objetos e anexos associados antes de enviar novamente este formulário',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -62,6 +62,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array(
|
||||
'Portal:Form:Close:Warning' => 'Вы действительно хотите закрыть эту форму? Введённые данные могут быть утеряны.',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -61,6 +61,7 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array(
|
||||
'Portal:Form:Close:Warning' => 'Do you want to leave this form? Data entered may be lost~~',
|
||||
'Portal:Error:ObjectCannotBeCreated' => 'Error: object cannot be created. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => 'Error: object cannot be updated. Check associated objects and attachments before submitting this form again.~~',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -70,6 +70,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array(
|
||||
'Portal:Form:Close:Warning' => '确定要离开表单吗? 已输入数据会丢失',
|
||||
'Portal:Error:ObjectCannotBeCreated' => '错误: 无法创建对象. 请在再次提交表单前检查相关对象和附件.',
|
||||
'Portal:Error:ObjectCannotBeUpdated' => '错误: 无法更新对象. 请在再次提交表单前检查相关对象和附件.',
|
||||
'Portal:Error:CheckToWriteFailed' => 'Error during validation of field \'%1$s\': %2$s~~',
|
||||
));
|
||||
|
||||
// UserProfile brick
|
||||
|
||||
@@ -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