diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 82aa05d2173..2eb3d1b5f2b 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -1,6 +1,7 @@ * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004 Benoit Mortier * * 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 @@ -34,6 +35,7 @@ if ($_POST["action"] == 'add') $contact->name = $_POST["name"]; $contact->firstname = $_POST["firstname"]; + $contact->civilite_id = $_POST["civilite_id"]; $contact->poste = $_POST["poste"]; $contact->address = $_POST["adresse"]; $contact->cp = $_POST["cp"]; @@ -72,6 +74,7 @@ if ($action == 'update') $contact->socid = $_POST["socid"]; $contact->name = $_POST["name"]; $contact->firstname = $_POST["firstname"]; + $contact->civilite_id = $_POST["civilite_id"]; $contact->poste = $_POST["poste"]; $contact->address = $_POST["adresse"]; @@ -87,11 +90,11 @@ if ($action == 'update') $contact->jabberid = $_POST["jabberid"]; $result = $contact->update($_POST["contactid"], $user); - + $error = $contact->error; } -if ($action == 'create_user') +if ($action == 'create_user') { $nuser = new User($db); $contact = new Contact($db); @@ -107,6 +110,7 @@ if ($action == 'create_user') */ llxHeader(); +$form = new Form($db); /* * Onglets @@ -140,7 +144,7 @@ if ($_GET["socid"] > 0) $objsoc->fetch($_GET["socid"]); } -if ($_GET["action"] == 'create') +if ($_GET["action"] == 'create') { print_fiche_titre ("Création d'un nouveau contact"); @@ -154,6 +158,10 @@ if ($_GET["action"] == 'create') print ''; } + print 'Titre'; + print $form->select_civilite($contact->civilite_id); + print ''; + print 'Nom'; print 'Prenom'; @@ -199,6 +207,10 @@ elseif ($_GET["action"] == 'edit') print ''; } + print 'Titre'; + print $form->select_civilite($contact->civilite_id); + print ''; + print 'Nom'; print 'Prénom'; @@ -248,8 +260,11 @@ else print 'Société : '.$objsoc->nom_url.''; } + print 'Titre : '.$contact->civilite."
"; + print 'Nom : '.$contact->name.' '.$contact->firstname ."
"; + if ($contact->poste) print 'Poste : '.$contact->poste ."
";