Add: champs supplmentaire pour la synchro ldap des contacts

This commit is contained in:
Regis Houssin 2007-05-30 11:59:01 +00:00
parent 3298939851
commit b2b82f524d
4 changed files with 15 additions and 6 deletions

View File

@ -58,6 +58,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
if (! dolibarr_set_const($db, 'LDAP_FIELD_COMPANY',$_POST["fieldcompany"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MAIL',$_POST["fieldmail"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_PHONE',$_POST["fieldphone"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_HOMEPHONE',$_POST["fieldhomephone"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MOBILE',$_POST["fieldmobile"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_FAX',$_POST["fieldfax"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_ADDRESS',$_POST["fieldaddress"])) $error++;
@ -175,7 +176,7 @@ print '</td><td>'.$langs->trans("LDAPFieldMailExample").'</td>';
print '<td align="right"><input type="radio" name="key" value="'.$conf->global->LDAP_FIELD_MAIL.'"'.($conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_FIELD_MAIL?' checked="true"':'')."></td>";
print '</tr>';
// Phone
// Phone pro
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldPhone").'</td><td>';
print '<input size="25" type="text" name="fieldphone" value="'.$conf->global->LDAP_FIELD_PHONE.'">';
@ -183,6 +184,14 @@ print '</td><td>'.$langs->trans("LDAPFieldPhoneExample").'</td>';
print '<td align="right"><input type="radio" name="key" value="'.$conf->global->LDAP_FIELD_PHONE.'"'.($conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_FIELD_PHONE?' checked="true"':'')."></td>";
print '</tr>';
// Phone home
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldHomePhone").'</td><td>';
print '<input size="25" type="text" name="fieldhomephone" value="'.$conf->global->LDAP_FIELD_HOMEPHONE.'">';
print '</td><td>'.$langs->trans("LDAPFieldHomePhoneExample").'</td>';
print '<td align="right"><input type="radio" name="key" value="'.$conf->global->LDAP_FIELD_HOMEPHONE.'"'.($conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_FIELD_HOMEPHONE?' checked="true"':'')."></td>";
print '</tr>';
// Mobile
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldMobile").'</td><td>';

View File

@ -257,7 +257,7 @@ class Contact
if ($this->ville && $conf->global->LDAP_FIELD_TOWN) $info[$conf->global->LDAP_FIELD_TOWN] = $this->ville;
if ($this->pays && $conf->global->LDAP_FIELD_COUNTRY) $info[$conf->global->LDAP_FIELD_COUNTRY] = $this->pays;
if ($this->phone_pro && $conf->global->LDAP_FIELD_PHONE) $info[$conf->global->LDAP_FIELD_PHONE] = $this->phone_pro;
if ($this->phone_perso && $conf->global->LDAP_FIELD_PHONE_PERSO) $info[$conf->global->LDAP_FIELD_PHONE_PERSO] = $this->phone_perso;
if ($this->phone_perso && $conf->global->LDAP_FIELD_HOMEPHONE) $info[$conf->global->LDAP_FIELD_HOMEPHONE] = $this->phone_perso;
if ($this->phone_mobile && $conf->global->LDAP_FIELD_MOBILE) $info[$conf->global->LDAP_FIELD_MOBILE] = $this->phone_mobile;
if ($this->fax && $conf->global->LDAP_FIELD_FAX) $info[$conf->global->LDAP_FIELD_FAX] = $this->fax;
if ($this->note && $conf->global->LDAP_FIELD_DESCRIPTION) $info[$conf->global->LDAP_FIELD_DESCRIPTION] = $this->note;

View File

@ -622,8 +622,8 @@ LDAPFieldMail=Email address
LDAPFieldMailExample=Example : mail
LDAPFieldPhone=Professional phone number
LDAPFieldPhoneExample=Example : telephonenumber
LDAPFieldPhonePerso=Personal phone number
LDAPFieldPhonePersoExample=Example : homephone
LDAPFieldHomePhone=Personal phone number
LDAPFieldHomePhoneExample=Example : homephone
LDAPFieldMobile=Cellular phone
LDAPFieldMobileExample=Example : mobile
LDAPFieldFax=Fax number

View File

@ -629,8 +629,8 @@ LDAPFieldMail=Email
LDAPFieldMailExample=Exemple : mail
LDAPFieldPhone=Téléphone professionnel
LDAPFieldPhoneExample=Exemple : telephonenumber
LDAPFieldPhonePerso=Téléphone perso
LDAPFieldPhonePersoExample=Exemple : homephone
LDAPFieldHomePhone=Téléphone perso
LDAPFieldHomePhoneExample=Exemple : homephone
LDAPFieldMobile=Téléphone portable
LDAPFieldMobileExample=Exemple : mobile
LDAPFieldFax=Fax