diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4a0b183f3a2..002ef9d455b 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -21,6 +21,14 @@ * $Source$ * */ + +/*! + \file htdocs/contact/fiche.php + \ingroup companies + \brief Page de la fiche contact + \version $Revision$ +*/ + require("./pre.inc.php"); require_once("../contact.class.php"); require (DOL_DOCUMENT_ROOT."/lib/vcard/vcard.class.php"); @@ -138,6 +146,7 @@ if ($_GET["action"] == 'delete') } + /* * Onglets */ @@ -218,10 +227,6 @@ if ($_GET["action"] == 'create') print 'Jabberid'; -// print 'Date de naissance'; -// print $form->select_date('','birthday',0,0,1); -// print ''; - print ''.$langs->trans("Note").''; print 'Contact facturation'; @@ -247,7 +252,7 @@ elseif ($_GET["action"] == 'edit') if ($_GET["socid"] > 0) { - print 'Société'.$objsoc->nom.''; + print ''.$langs->trans("Company").''.$objsoc->nom.''; print ''; } @@ -255,8 +260,8 @@ elseif ($_GET["action"] == 'edit') print $form->select_civilite($contact->civilite_id); print ''; - print 'Nom'; - print 'Prénom'; + print ''.$langs->trans("Lastname").''; + print ''.$langs->trans("Firstname").''; print 'Tel Pro'; @@ -264,18 +269,18 @@ elseif ($_GET["action"] == 'edit') print 'Tel Perso'; - print 'Adresse'; + print ''.$langs->trans("Address").''; print 'Portable'; print 'CP Ville '; - print 'Fax'; - print 'Email'; + print ''.$langs->trans("Fax").''; + print ''.$langs->trans("EMail").''; print 'Jabberid'; - print 'Note'; + print ''.$langs->trans("Note").''; print ''; @@ -283,7 +288,7 @@ elseif ($_GET["action"] == 'edit') print 'Contact facturation'; print ''; - print ""; + print "
"; print ""; } @@ -297,58 +302,50 @@ else $contact = new Contact($db); $contact->fetch($_GET["id"], $user); - print_fiche_titre ("Contact : ". $contact->firstname.' '.$contact->name); + print_fiche_titre ($langs->trans("Contact")." : ". $contact->firstname.' '.$contact->name); + print ''; - if ($contact->socid > 0) { $objsoc = new Societe($db); $objsoc->fetch($contact->socid); - print ''; + print ''; } - //TODO Aller chercher le libellé de la civilite a partir de l'id $contact->civilite_id //print ''; @@ -385,6 +382,7 @@ else print ""; + // Barre d'actions if ($user->societe_id == 0) { @@ -402,7 +400,8 @@ else print ""; } } - $db->close(); + +$db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>
Société : '.$objsoc->nom_url.'
'.$langs->trans("Company").' : '.$objsoc->nom_url.'
Titre : '.$contact->civilite."
"; - print '
Nom : '.$contact->name.' '.$contact->firstname ."
"; - + print '
'.$langs->trans("Name").' : '.$contact->name.' '.$contact->firstname ."
"; if ($contact->poste) print 'Poste : '.$contact->poste ."
"; - if ($contact->email) - print 'Email : '.$contact->email ."
"; - - /* - * Pas le temps de comprendre les 2 regexp - * je laisse les deux, vu ce que cela coute ;-) - */ - - if (!ValidEmail($contact->email)) + if ($contact->email) { + print $langs->trans("EMail").' : '.$contact->email ."
"; + + if (!ValidEmail($contact->email)) { - print "Email invalide !
"; + print "".$langs->trans("ErrorBadEMail",$contact->email)."
"; } - - if (!valid_email($contact->email)) - { - print "Email invalide, syntaxe incorrecte !
"; - } - - /* - * Risque de poser des problèmes en cas de non connexion au Réseau - * TODO : ajouter une option pour désactiver ce test - * - */ - - if (!check_mail($contact->email)) + + /* + * Pose des problèmes en cas de non connexion au Réseau + * et en cas ou la fonction checkdnsrr n'est pas disponible dans php + * (cas fréquent sur certains hébergeurs) + */ + /* + if (!check_mail($contact->email)) { print "Email invalide, nom de domaine incorrecte !
"; } + */ + } + + /* * */ @@ -371,7 +368,7 @@ else print 'Portable : '.$contact->phone_mobile."
"; if($contact->fax) - print 'Fax : '.$contact->fax."
"; + print $langs->trans("Fax").' : '.$contact->fax."
"; print '