|
|
|
|
@ -239,7 +239,9 @@ if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->adhe
|
|
|
|
|
$adh->adresse = trim($_POST["adresse"]);
|
|
|
|
|
$adh->cp = trim($_POST["cp"]);
|
|
|
|
|
$adh->ville = trim($_POST["ville"]);
|
|
|
|
|
$adh->pays_id = $_POST["pays"];
|
|
|
|
|
|
|
|
|
|
$adh->fk_departement = $_POST["departement_id"];
|
|
|
|
|
$adh->pays_id = $_POST["pays"];
|
|
|
|
|
|
|
|
|
|
$adh->phone = trim($_POST["phone"]);
|
|
|
|
|
$adh->phone_perso = trim($_POST["phone_perso"]);
|
|
|
|
|
@ -357,6 +359,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
|
|
|
|
|
$adresse=$_POST["adresse"];
|
|
|
|
|
$cp=$_POST["cp"];
|
|
|
|
|
$ville=$_POST["ville"];
|
|
|
|
|
$departement_id=$_POST["departement_id"];
|
|
|
|
|
$pays_id=$_POST["pays_id"];
|
|
|
|
|
|
|
|
|
|
$phone=$_POST["phone"];
|
|
|
|
|
@ -381,6 +384,7 @@ if ($_POST["action"] == 'add' && $user->rights->adherent->creer)
|
|
|
|
|
$adh->adresse = $adresse;
|
|
|
|
|
$adh->cp = $cp;
|
|
|
|
|
$adh->ville = $ville;
|
|
|
|
|
$adh->fk_departement = $departement_id;
|
|
|
|
|
$adh->pays_id = $pays_id;
|
|
|
|
|
$adh->phone = $phone;
|
|
|
|
|
$adh->phone_perso = $phone_perso;
|
|
|
|
|
@ -660,6 +664,8 @@ $htmlcompany = new FormCompany($db);
|
|
|
|
|
// fetch optionals attributes and labels
|
|
|
|
|
$adho->fetch_name_optionals_label();
|
|
|
|
|
|
|
|
|
|
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($action == 'edit')
|
|
|
|
|
{
|
|
|
|
|
@ -682,9 +688,24 @@ if ($action == 'edit')
|
|
|
|
|
$adht->fetch($adh->typeid);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Affichage onglets
|
|
|
|
|
*/
|
|
|
|
|
// We set pays_id, and pays_code label of the chosen country
|
|
|
|
|
if ($adh->pays_id)
|
|
|
|
|
{
|
|
|
|
|
$sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays"])?$_POST["pays"]:$adh->pays_id);
|
|
|
|
|
$resql=$db->query($sql);
|
|
|
|
|
if ($resql)
|
|
|
|
|
{
|
|
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dol_print_error($db);
|
|
|
|
|
}
|
|
|
|
|
$adh->pays_code=$obj->code;
|
|
|
|
|
$adh->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$head = member_prepare_head($adh);
|
|
|
|
|
|
|
|
|
|
dol_fiche_head($head, 'general', $langs->trans("Member"), 0, 'user');
|
|
|
|
|
@ -696,11 +717,11 @@ if ($action == 'edit')
|
|
|
|
|
if ($mesg) print '<div class="ok">'.$mesg.'</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$rowspan=15;
|
|
|
|
|
$rowspan=17;
|
|
|
|
|
$rowspan+=sizeof($adho->attribute_label);
|
|
|
|
|
if ($conf->societe->enabled) $rowspan++;
|
|
|
|
|
|
|
|
|
|
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
|
|
|
|
|
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
|
|
|
|
print "<input type=\"hidden\" name=\"rowid\" value=\"$rowid\">";
|
|
|
|
|
@ -715,20 +736,20 @@ if ($action == 'edit')
|
|
|
|
|
$morphys["phy"] = $langs->trans("Physical");
|
|
|
|
|
$morphys["mor"] = $langs->trans("Morale");
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Person").'</span></td><td colspan="2">';
|
|
|
|
|
$html->select_array("morphy", $morphys, $adh->morphy);
|
|
|
|
|
$html->select_array("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$adh->morphy);
|
|
|
|
|
print "</td></tr>";
|
|
|
|
|
|
|
|
|
|
// Societe
|
|
|
|
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2"><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Company").'</td><td colspan="2"><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?$_POST["societe"]:$adh->societe).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Civilite
|
|
|
|
|
print '<tr><td width="20%">'.$langs->trans("UserTitle").'</td><td width="35%">';
|
|
|
|
|
print $htmlcompany->select_civilite($adh->civilite_id);
|
|
|
|
|
print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$adh->civilite_id)."\n";
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
// Photo
|
|
|
|
|
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
|
|
|
|
|
print $html->showphoto('memberphoto',$adh);
|
|
|
|
|
print $html->showphoto('memberphoto',$adh)."\n";
|
|
|
|
|
if ($caneditfieldmember)
|
|
|
|
|
{
|
|
|
|
|
print '<br><br><table class="nobordernopadding"><tr><td>'.$langs->trans("PhotoFile").'</td></tr>';
|
|
|
|
|
@ -740,24 +761,24 @@ if ($action == 'edit')
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Nom
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.$adh->nom.'"></td>';
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" size="40" value="'.(isset($_POST["nom"])?$_POST["nom"]:$adh->nom).'"></td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Prenom
|
|
|
|
|
print '<tr><td width="20%"><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
|
|
|
|
|
print '<tr><td width="20%"><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$adh->prenom).'"></td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Login
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="login" size="30" value="'.$adh->login.'"></td></tr>';
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$adh->login).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Password
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td><input type="password" name="pass" size="30" value="'.$adh->pass.'"></td></tr>';
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Password").'</span></td><td><input type="password" name="pass" size="30" value="'.(isset($_POST["pass"])?$_POST["pass"]:$adh->pass).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Type
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Type").'</span></td><td>';
|
|
|
|
|
if ($user->rights->adherent->creer)
|
|
|
|
|
{
|
|
|
|
|
$html->select_array("typeid", $adht->liste_array(), $adh->typeid);
|
|
|
|
|
$html->select_array("typeid", $adht->liste_array(), (isset($_POST["typeid"])?$_POST["typeid"]:$adh->typeid));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
@ -768,36 +789,42 @@ if ($action == 'edit')
|
|
|
|
|
|
|
|
|
|
// Address
|
|
|
|
|
print '<tr><td>'.$langs->trans("Address").'</td><td>';
|
|
|
|
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.$adh->adresse.'</textarea></td></tr>';
|
|
|
|
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.(isset($_POST["adresse"])?$_POST["adresse"]:$adh->adresse).'</textarea></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Cp
|
|
|
|
|
print '<tr><td>'.$langs->trans("Zip").'/'.$langs->trans("Town").'</td><td><input type="text" name="cp" size="6" value="'.$adh->cp.'"> <input type="text" name="ville" size="32" value="'.$adh->ville.'"></td></tr>';
|
|
|
|
|
// Zip / Town
|
|
|
|
|
print '<tr><td>'.$langs->trans("Zip").'/'.$langs->trans("Town").'</td><td><input type="text" name="cp" size="6" value="'.(isset($_POST["cp"])?$_POST["cp"]:$adh->cp).'"> <input type="text" name="ville" size="32" value="'.(isset($_POST["ville"])?$_POST["ville"]:$adh->ville).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Country
|
|
|
|
|
print '<tr><td>'.$langs->trans("Country").'</td><td>';
|
|
|
|
|
$html->select_pays($adh->pays_code?$adh->pays_code:$mysoc->pays_code,'pays');
|
|
|
|
|
$html->select_pays(isset($_POST["pays"])?$_POST["pays"]:$adh->pays_id,'pays',$conf->use_javascript_ajax?' onChange="company_save_refresh_edit()"':'');
|
|
|
|
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Department
|
|
|
|
|
print '<tr><td>'.$langs->trans('State').'</td><td>';
|
|
|
|
|
$htmlcompany->select_departement($adh->fk_departement,$adh->pays_code);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Tel
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.$adh->phone.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"])?$_POST["phone"]:$adh->phone).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Tel perso
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.$adh->phone_perso.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$adh->phone_perso).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Tel mobile
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.$adh->phone_mobile.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$adh->phone_mobile).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// EMail
|
|
|
|
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.$adh->email.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="email" size="40" value="'.(isset($_POST["email"])?$_POST["email"]:$adh->email).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Date naissance
|
|
|
|
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
|
|
|
|
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'update');
|
|
|
|
|
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'formsoc');
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
// Profil public
|
|
|
|
|
print "<tr><td>".$langs->trans("Public")."</td><td>\n";
|
|
|
|
|
print $html->selectyesno("public",$adh->public,1);
|
|
|
|
|
print $html->selectyesno("public",(isset($_POST["public"])?$_POST["public"]:$adh->public),1);
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
// Attributs supplementaires
|
|
|
|
|
@ -833,7 +860,7 @@ if ($action == 'edit')
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
print '<tr><td colspan="3" align="center">';
|
|
|
|
|
print '<input type="submit" class="button" name="submit" value="'.$langs->trans("Save").'">';
|
|
|
|
|
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
|
|
|
|
print ' ';
|
|
|
|
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
@ -852,6 +879,27 @@ if ($action == 'create')
|
|
|
|
|
/* Fiche creation */
|
|
|
|
|
/* */
|
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
$adh->fk_departement = $_POST["departement_id"];
|
|
|
|
|
|
|
|
|
|
// We set pays_id, pays_code and label for the selected country
|
|
|
|
|
$adh->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS;
|
|
|
|
|
if ($adh->pays_id)
|
|
|
|
|
{
|
|
|
|
|
$sql = "SELECT code, libelle";
|
|
|
|
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_pays";
|
|
|
|
|
$sql.= " WHERE rowid = ".$adh->pays_id;
|
|
|
|
|
$resql=$db->query($sql);
|
|
|
|
|
if ($resql)
|
|
|
|
|
{
|
|
|
|
|
$obj = $db->fetch_object($resql);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dol_print_error($db);
|
|
|
|
|
}
|
|
|
|
|
$adh->pays_code=$obj->code;
|
|
|
|
|
$adh->pays=$obj->libelle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$adht = new AdherentType($db);
|
|
|
|
|
|
|
|
|
|
@ -863,7 +911,7 @@ if ($action == 'create')
|
|
|
|
|
}
|
|
|
|
|
if ($mesg) print '<div class="ok">'.$mesg.'</div>';
|
|
|
|
|
|
|
|
|
|
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
|
|
|
|
|
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
|
|
|
|
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
|
|
|
print '<input type="hidden" name="action" value="add">';
|
|
|
|
|
|
|
|
|
|
@ -873,27 +921,27 @@ if ($action == 'create')
|
|
|
|
|
$morphys["phy"] = "Physique";
|
|
|
|
|
$morphys["mor"] = "Morale";
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Person")."</span></td><td>\n";
|
|
|
|
|
$html->select_array("morphy", $morphys, $adh->morphy, 1);
|
|
|
|
|
$html->select_array("morphy", $morphys, isset($_POST["morphy"])?$_POST["morphy"]:$adh->morphy, 1);
|
|
|
|
|
print "</td>\n";
|
|
|
|
|
|
|
|
|
|
// Company
|
|
|
|
|
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.$adh->societe.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(isset($_POST["societe"])?$_POST["societe"]:$adh->societe).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Civility
|
|
|
|
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
|
|
|
|
print $htmlcompany->select_civilite($adh->civilite_id,'civilite_id').'</td>';
|
|
|
|
|
print $htmlcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$adh->civilite_id,'civilite_id').'</td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Nom
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.$adh->nom.'" size="40"></td>';
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td><input type="text" name="nom" value="'.(isset($_POST["nom"])?$_POST["nom"]:$adh->nom).'" size="40"></td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Prenom
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.$adh->prenom.'"></td>';
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$adh->prenom).'"></td>';
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
// Login
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="member_login" size="40" value="'.$adh->login.'"></td></tr>';
|
|
|
|
|
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$adh->login).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Mot de passe
|
|
|
|
|
$generated_password='';
|
|
|
|
|
@ -915,7 +963,7 @@ if ($action == 'create')
|
|
|
|
|
$listetype=$adht->liste_array();
|
|
|
|
|
if (sizeof($listetype))
|
|
|
|
|
{
|
|
|
|
|
$html->select_array("typeid", $listetype, $typeid, 1);
|
|
|
|
|
$html->select_array("typeid", $listetype, isset($_POST["typeid"])?$_POST["typeid"]:$typeid, 1);
|
|
|
|
|
} else {
|
|
|
|
|
print '<font class="error">'.$langs->trans("NoTypeDefinedGoToSetup").'</font>';
|
|
|
|
|
}
|
|
|
|
|
@ -923,31 +971,45 @@ if ($action == 'create')
|
|
|
|
|
|
|
|
|
|
// Address
|
|
|
|
|
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td>';
|
|
|
|
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.$adh->adresse.'</textarea></td></tr>';
|
|
|
|
|
print '<textarea name="adresse" wrap="soft" cols="40" rows="2">'.(isset($_POST["adresse"])?$_POST["adresse"]:$adh->adresse).'</textarea></td></tr>';
|
|
|
|
|
|
|
|
|
|
// CP / Ville
|
|
|
|
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8"> <input type="text" name="ville" size="32" value="'.$adh->ville.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td><input type="text" name="cp" size="8" value="'.(isset($_POST["cp"])?$_POST["cp"]:$adh->cp).'"> <input type="text" name="ville" size="32" value="'.(isset($_POST["ville"])?$_POST["ville"]:$adh->ville).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Pays
|
|
|
|
|
print '<tr><td>'.$langs->trans("Country").'</td><td>';
|
|
|
|
|
$html->select_pays($adh->pays_id ? $adh->pays_id : $mysoc->pays_id,'pays_id');
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
// Country
|
|
|
|
|
$adh->pays_id=$adh->pays_id?$adh->pays_id:$mysoc->pays_id;
|
|
|
|
|
print '<tr><td>'.$langs->trans("Country").'</td><td>';
|
|
|
|
|
$html->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$adh->pays_id,'pays_id',$conf->use_javascript_ajax?' onChange="company_save_refresh_create()"':'');
|
|
|
|
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// State
|
|
|
|
|
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
|
|
|
|
|
if ($adh->pays_id)
|
|
|
|
|
{
|
|
|
|
|
$htmlcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$adh->fk_departement,$adh->pays_code);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
print $countrynotdefined;
|
|
|
|
|
}
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Tel pro
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.$adh->phone.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePro").'</td><td><input type="text" name="phone" size="20" value="'.(isset($_POST["phone"])?$_POST["phone"]:$adh->phone).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Tel perso
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.$adh->phone_perso.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td><input type="text" name="phone_perso" size="20" value="'.(isset($_POST["phone_perso"])?$_POST["phone_perso"]:$adh->phone_perso).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Tel mobile
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.$adh->phone_mobile.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$adh->phone_mobile).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// EMail
|
|
|
|
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="member_email" size="40" value="'.$adh->email.'"></td></tr>';
|
|
|
|
|
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED?'<span class="fieldrequired">':'').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED?'</span>':'').'</td><td><input type="text" name="member_email" size="40" value="'.(isset($_POST["member_email"])?$_POST["member_email"]:$adh->email).'"></td></tr>';
|
|
|
|
|
|
|
|
|
|
// Date naissance
|
|
|
|
|
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
|
|
|
|
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'add');
|
|
|
|
|
$html->select_date(($adh->naiss ? $adh->naiss : -1),'naiss','','',1,'formsoc');
|
|
|
|
|
print "</td></tr>\n";
|
|
|
|
|
|
|
|
|
|
// Profil public
|
|
|
|
|
@ -958,7 +1020,7 @@ if ($action == 'create')
|
|
|
|
|
// Attribut optionnels
|
|
|
|
|
foreach($adho->attribute_label as $key=>$value)
|
|
|
|
|
{
|
|
|
|
|
print "<tr><td>$value</td><td><input type=\"text\" name=\"options_$key\" size=\"40\"></td></tr>\n";
|
|
|
|
|
print "<tr><td>".$value.'</td><td><input type="text" name="options_'.$key.'" size="40" value="'.(isset($_POST["options_".$key])?$_POST["options_".$key]:'').'"></td></tr>'."\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
@ -1159,12 +1221,15 @@ if ($rowid && $action != 'edit')
|
|
|
|
|
// Address
|
|
|
|
|
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">'.nl2br($adh->adresse).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// CP / Ville
|
|
|
|
|
// Zip / Town
|
|
|
|
|
print '<tr><td>'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$adh->cp.' '.$adh->ville.'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Pays
|
|
|
|
|
// Pays
|
|
|
|
|
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">'.getCountryLabel($adh->pays_id).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
// Department
|
|
|
|
|
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">'.$adh->departement.'</td>';
|
|
|
|
|
|
|
|
|
|
// Tel pro.
|
|
|
|
|
print '<tr><td>'.$langs->trans("PhonePro").'</td><td class="valeur">'.dol_print_phone($adh->phone,$adh->pays_code,0,$adh->fk_soc,1).'</td></tr>';
|
|
|
|
|
|
|
|
|
|
|