From 939b439ecfb31f6d019593c9e52ccc4ae30c2436 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Jun 2007 21:16:18 +0000 Subject: [PATCH] On peut creer un adherent de type morale sans mettre de prenom --- htdocs/adherents/fiche.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 681aa2b4e73..d35be89415d 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -269,8 +269,8 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'add') $error++; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; } - if (!isset($prenom) || $prenom=='') { - $error++; + if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) { + $error++; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; } if ($conf->global->ADHERENT_MAIL_REQUIRED && ! ValidEMail($email)) { @@ -604,6 +604,7 @@ if ($action == 'edit') $morphys["phy"] = $langs->trans("Physical"); $morphys["mor"] = $langs->trans("Morale"); print "".$langs->trans("Person").""; + print $adh->morphy; $htmls->select_array("morphy", $morphys, $adh->morphy); print ""; @@ -725,7 +726,7 @@ if ($action == 'create') $morphys["phy"] = "Physique"; $morphys["mor"] = "Morale"; print "".$langs->trans("Person")."*\n"; - $htmls->select_array("morphy", $morphys); + $htmls->select_array("morphy", $morphys, $adh->morphy); print "\n"; print ''.$langs->trans("Company").'';