diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index db65c1754f5..c798cb8093e 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Éric Seigne - * Copyright (C) 2005-2006 Laurent Destailleur + * Copyright (C) 2005-2007 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ - * $Source$ */ /** @@ -111,7 +110,7 @@ print ' '.$langs->trans("Name").''; print ' '.$langs->trans("Description").''; print ' '.$langs->trans("Example").''; print ' '.$langs->trans("Activated").''; -print '  '; +print ' '.$langs->trans("Infos").''; print "\n"; clearstatcache(); @@ -145,17 +144,20 @@ if ($handle) if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file") { - print " \n"; + print "\n"; print img_tick(); - print "\n  \n"; + print "\n"; } else { - - print ' '; print ''.$langs->trans("Activate").''; } - + + print ''; + $s=$modCodeTiers->getToolTip($langs,$soc,-1); + print $form->textwithhelp('',$s,1); + print ''; + print ''; } } @@ -177,7 +179,7 @@ print ''.$langs->trans("Name").''; print ''.$langs->trans("Description").''; print ''.$langs->trans("Example").''; print ''.$langs->trans("Activated").''; -print ' '; +print ' '; print "\n"; clearstatcache(); @@ -208,15 +210,14 @@ if ($handle) { print ''; print img_tick(); - print ' '; + print ''; } else { - print ' '; print ''.$langs->trans("Activate").''; } - + print ' '; print "\n"; } } diff --git a/htdocs/includes/modules/societe/modules_societe.class.php b/htdocs/includes/modules/societe/modules_societe.class.php index ba6b86e431a..8b5803fcdf1 100644 --- a/htdocs/includes/modules/societe/modules_societe.class.php +++ b/htdocs/includes/modules/societe/modules_societe.class.php @@ -128,6 +128,7 @@ class ModeleThirdPartyCode if ($type != -1) $s.=$langs->trans("ValidityControledByModule").': '.$this->getNom($langs).'
'; if ($type == 0) $s.=$langs->trans("RequiredIfCustomer").': '.yn(!$this->code_null).'
'; if ($type == 1) $s.=$langs->trans("RequiredIfSupplier").': '.yn(!$this->code_null).'
'; + if ($type == -1) $s.=$langs->trans("Required").': '.yn(!$this->code_null).'
'; $s.=$langs->trans("CanBeModifiedIfOk").': '.yn($this->code_modifiable).'
'; $s.=$langs->trans("CanBeModifiedIfKo").': '.yn($this->code_modifiable_invalide).'
'; if ($type != -1) $s.=$langs->trans("Example").': '.$this->getExample($langs,$soc,1).''; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 41eb237a8c4..582be224974 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -387,6 +387,8 @@ DetectedVersion=Detected version FollowingConstantsWillBeSubstituted=Following constants will be substitute with corresponding value. Refresh=Refresh BackToList=Back to list +CanBeModifiedIfOk=Can be modified if valid +CanBeModifiedIfKo=Can be modified if not valid # Week day Monday=Monday Tuesday=Tuesday diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 7f83c2c9585..ae919c7a935 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -388,6 +388,8 @@ DetectedVersion=Version d FollowingConstantsWillBeSubstituted=Les constantes suivantes seront substituées par leur valeur correspondante. Refresh=Rafraichir BackToList=Retour liste +CanBeModifiedIfOk=Peut être modifié si valide +CanBeModifiedIfKo=Peut être modifié si invalide # Week day Monday=Lundi Tuesday=Mardi diff --git a/htdocs/soc.php b/htdocs/soc.php index 0380f7e5885..944e4e55e6c 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -349,10 +349,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] || print ''; } print ''; - $s=$langs->trans("CustomerCodeDesc").'
'; - $s.=$langs->trans("ValidityControledByModule").': '.$modCodeClient->getNom($langs).'
'; - $s.=$langs->trans("RequiredIfCustomer").': '.yn(!$modCodeClient->code_null).'
'; - $s.=$langs->trans("Example").': '.$modCodeClient->getExample($langs,$soc,1).''; + $s=$modCodeClient->getToolTip($langs,$soc,0); print $form->textwithhelp('',$s,1); print ''; @@ -374,10 +371,7 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] || print ''; } print ''; - $s=$langs->trans("SupplierCodeDesc").'
'; - $s.=$langs->trans("ValidityControledByModule").': '.$modCodeFournisseur->getNom($langs).'
'; - $s.=$langs->trans("RequiredIfSupplier").': '.yn(!$modCodeFournisseur->code_null).'
'; - $s.=$langs->trans("Example").': '.$modCodeFournisseur->getExample($langs,$soc,2).''; + $s=$modCodeFournisseur->getToolTip($langs,$soc,1); print $form->textwithhelp('',$s,1); print ''; @@ -682,10 +676,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''; } print ''; - $s=$langs->trans("CustomerCodeDesc").'
'; - $s.=$langs->trans("ValidityControledByModule").': '.$modCodeClient->getNom($langs).'
'; - $s.=$langs->trans("RequiredIfCustomer").': '.yn(!$modCodeClient->code_null).'
'; - $s.=$langs->trans("Example").': '.$modCodeClient->getExample($langs,$soc,1).''; + $s=$modCodeClient->getToolTip($langs,$soc,0); print $form->textwithhelp('',$s,1); print ''; @@ -709,10 +700,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''; } print ''; - $s=$langs->trans("SupplierCodeDesc").'
'; - $s.=$langs->trans("ValidityControledByModule").': '.$modCodeFournisseur->getNom($langs).'
'; - $s.=$langs->trans("RequiredIfSupplier").': '.yn(!$modCodeFournisseur->code_null).'
'; - $s.=$langs->trans("Example").': '.$modCodeFournisseur->getExample($langs,$soc,2).''; + $s=$modCodeFournisseur->getToolTip($langs,$soc,1); print $form->textwithhelp('',$s,1); print '';