diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 7b92d5a69b4..d9d0a83e624 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -13,4 +13,5 @@ ErrorBadSupplierCodeSyntax=Bad syntax for supplier code ErrorSupplierCodeRequired=Supplier code required ErrorSupplierCodeAlreadyUsed=Supplier code already used ErrorBadParameters=Bad parameters -UserCannotBeDelete=User can not be deleted. May be it is associated on Dolibarr entities. \ No newline at end of file +UserCannotBeDelete=User can not be deleted. May be it is associated on Dolibarr entities. +ErrorFieldsRequired=Some required fields were not filled. \ No newline at end of file diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index e3cd5865f57..1ce8503a3e8 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -14,4 +14,4 @@ ErrorSupplierCodeRequired=Code fournisseur obligatoire ErrorSupplierCodeAlreadyUsed=Code fournisseur deja utilise ErrorBadParameters=Parametres incorrects UserCannotBeDelete=L'utilisateur ne peut pas etre supprimée. Peut-être est-il associé à des éléments de Dolibarr. -ErrorFieldsRequired=Des champs obligatoires n'ont pas été renseigné \ No newline at end of file +ErrorFieldsRequired=Des champs obligatoires n'ont pas été renseignés \ No newline at end of file diff --git a/htdocs/project.class.php b/htdocs/project.class.php index e6754751b31..0abbc29fb10 100644 --- a/htdocs/project.class.php +++ b/htdocs/project.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2006 Laurent Destailleur + * Copyright (C) 2005-2007 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -80,6 +79,7 @@ class Project extends CommonObject } else { + $this->error='ErrorFieldsRequired'; dolibarr_syslog("Project::Create error -1 ref null"); $result = -1; } diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 9dc839a7129..f15f8017eaa 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -59,7 +58,8 @@ if ($_POST["action"] == 'add' && $user->rights->projet->creer) } else { - $mesg='
'.$pro->error.'
'; + $langs->load("errors"); + $mesg='
'.$langs->trans($pro->error).'
'; $_GET["action"] = 'create'; } }