Merge remote-tracking branch 'upstream/develop' into new_branch_10_10_2018

This commit is contained in:
Philippe GRAND 2018-10-12 12:16:57 +02:00
commit 995e9b4f55
17 changed files with 391 additions and 134 deletions

View File

@ -301,6 +301,8 @@ if (empty($reshook))
$object->phone_mobile= trim(GETPOST("phone_mobile",'alpha')); $object->phone_mobile= trim(GETPOST("phone_mobile",'alpha'));
$object->email = preg_replace('/\s+/', '', GETPOST("member_email",'alpha')); $object->email = preg_replace('/\s+/', '', GETPOST("member_email",'alpha'));
$object->skype = trim(GETPOST("skype",'alpha')); $object->skype = trim(GETPOST("skype",'alpha'));
$object->twitter = trim(GETPOST("twitter",'alpha'));
$object->facebook = trim(GETPOST("facebook",'alpha'));
$object->birth = $birthdate; $object->birth = $birthdate;
$object->typeid = GETPOST("typeid",'int'); $object->typeid = GETPOST("typeid",'int');
@ -443,6 +445,8 @@ if (empty($reshook))
$phone_perso=GETPOST("phone_perso",'alpha'); $phone_perso=GETPOST("phone_perso",'alpha');
$phone_mobile=GETPOST("phone_mobile",'alpha'); $phone_mobile=GETPOST("phone_mobile",'alpha');
$skype=GETPOST("member_skype",'alpha'); $skype=GETPOST("member_skype",'alpha');
$twitter=GETPOST("member_twitter",'alpha');
$facebook=GETPOST("member_facebook",'alpha');
$email=preg_replace('/\s+/', '', GETPOST("member_email",'alpha')); $email=preg_replace('/\s+/', '', GETPOST("member_email",'alpha'));
$login=GETPOST("member_login",'alpha'); $login=GETPOST("member_login",'alpha');
$pass=GETPOST("password",'alpha'); $pass=GETPOST("password",'alpha');
@ -467,7 +471,11 @@ if (empty($reshook))
$object->phone = $phone; $object->phone = $phone;
$object->phone_perso = $phone_perso; $object->phone_perso = $phone_perso;
$object->phone_mobile= $phone_mobile; $object->phone_mobile= $phone_mobile;
$object->skype = $skype; $object->skype = $skype;
$object->twitter = $twitter;
$object->facebook = $facebook;
$object->email = $email; $object->email = $email;
$object->login = $login; $object->login = $login;
$object->pass = $pass; $object->pass = $pass;
@ -980,12 +988,24 @@ else
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>'; print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->socialnetworks->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>'; print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
} }
// Birthday // Twitter
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Twitter").'</td><td><input type="text" name="member_twitter" size="40" value="'.(GETPOST('member_twitter','alpha')?GETPOST('member_twitter','alpha'):$object->twitter).'"></td></tr>';
}
// Facebook
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Facebook").'</td><td><input type="text" name="member_facebook" size="40" value="'.(GETPOST('member_facebook','alpha')?GETPOST('member_facebook','alpha'):$object->facebook).'"></td></tr>';
}
// Birthday
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n"; print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
print "</td></tr>\n"; print "</td></tr>\n";
@ -1218,12 +1238,24 @@ else
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?GETPOST("phone_mobile"):$object->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"])?GETPOST("phone_mobile"):$object->phone_mobile).'"></td></tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->socialnetworks->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" class="minwidth100" value="'.(isset($_POST["skype"])?GETPOST("skype"):$object->skype).'"></td></tr>'; print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" class="minwidth100" value="'.(isset($_POST["skype"])?GETPOST("skype"):$object->skype).'"></td></tr>';
} }
// Birthday // Twitter
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Twitter").'</td><td><input type="text" name="twitter" class="minwidth100" value="'.(isset($_POST["twitter"])?GETPOST("twitter"):$object->twitter).'"></td></tr>';
}
// Facebook
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Facebook").'</td><td><input type="text" name="facebook" class="minwidth100" value="'.(isset($_POST["facebook"])?GETPOST("facebook"):$object->facebook).'"></td></tr>';
}
// Birthday
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n"; print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc'); print $form->selectDate(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
print "</td></tr>\n"; print "</td></tr>\n";

View File

@ -88,7 +88,11 @@ class Adherent extends CommonObject
public $state; // Label of department public $state; // Label of department
public $email; public $email;
public $skype; public $skype;
public $twitter;
public $facebook;
public $phone; public $phone;
public $phone_perso; public $phone_perso;
public $phone_mobile; public $phone_mobile;
@ -468,6 +472,8 @@ class Adherent extends CommonObject
$sql.= ", state_id = ".($this->state_id>0?$this->db->escape($this->state_id):"null"); $sql.= ", state_id = ".($this->state_id>0?$this->db->escape($this->state_id):"null");
$sql.= ", email = '".$this->db->escape($this->email)."'"; $sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", skype = '".$this->db->escape($this->skype)."'"; $sql.= ", skype = '".$this->db->escape($this->skype)."'";
$sql.= ", twitter = '".$this->db->escape($this->twitter)."'";
$sql.= ", facebook = '".$this->db->escape($this->facebook)."'";
$sql.= ", phone = ".($this->phone?"'".$this->db->escape($this->phone)."'":"null"); $sql.= ", phone = ".($this->phone?"'".$this->db->escape($this->phone)."'":"null");
$sql.= ", phone_perso = ".($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null"); $sql.= ", phone_perso = ".($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
$sql.= ", phone_mobile = ".($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null"); $sql.= ", phone_mobile = ".($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
@ -574,6 +580,8 @@ class Adherent extends CommonObject
$luser->email=$this->email; $luser->email=$this->email;
$luser->skype=$this->skype; $luser->skype=$this->skype;
$luser->twitter=$this->twitter;
$luser->facebook=$this->facebook;
$luser->office_phone=$this->phone; $luser->office_phone=$this->phone;
$luser->user_mobile=$this->phone_mobile; $luser->user_mobile=$this->phone_mobile;
@ -613,6 +621,8 @@ class Adherent extends CommonObject
$lthirdparty->town=$this->town; $lthirdparty->town=$this->town;
$lthirdparty->email=$this->email; $lthirdparty->email=$this->email;
$lthirdparty->skype=$this->skype; $lthirdparty->skype=$this->skype;
$lthirdparty->twitter=$this->twitter;
$lthirdparty->facebook=$this->facebook;
$lthirdparty->phone=$this->phone; $lthirdparty->phone=$this->phone;
$lthirdparty->state_id=$this->state_id; $lthirdparty->state_id=$this->state_id;
$lthirdparty->country_id=$this->country_id; $lthirdparty->country_id=$this->country_id;
@ -1100,7 +1110,7 @@ class Adherent extends CommonObject
$sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,"; $sql = "SELECT d.rowid, d.ref_ext, d.civility as civility_id, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note_private,";
$sql.= " d.note_public,"; $sql.= " d.note_public,";
$sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,"; $sql.= " d.email, d.skype, d.twitter, d.facebook, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass, d.pass_crypted,";
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,"; $sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
$sql.= " d.datec as datec,"; $sql.= " d.datec as datec,";
$sql.= " d.tms as datem,"; $sql.= " d.tms as datem,";
@ -1172,7 +1182,10 @@ class Adherent extends CommonObject
$this->phone_perso = $obj->phone_perso; $this->phone_perso = $obj->phone_perso;
$this->phone_mobile = $obj->phone_mobile; $this->phone_mobile = $obj->phone_mobile;
$this->email = $obj->email; $this->email = $obj->email;
$this->skype = $obj->skype; $this->skype = $obj->skype;
$this->twitter = $obj->twitter;
$this->facebook = $obj->facebook;
$this->photo = $obj->photo; $this->photo = $obj->photo;
$this->statut = $obj->statut; $this->statut = $obj->statut;
@ -2265,7 +2278,9 @@ class Adherent extends CommonObject
$this->country = 'France'; $this->country = 'France';
$this->morphy = 1; $this->morphy = 1;
$this->email = 'specimen@specimen.com'; $this->email = 'specimen@specimen.com';
$this->skype = 'tom.hanson'; $this->skype = 'skypepseudo';
$this->twitter = 'twitterpseudo';
$this->facebook = 'facebookpseudo';
$this->phone = '0999999999'; $this->phone = '0999999999';
$this->phone_perso = '0999999998'; $this->phone_perso = '0999999998';
$this->phone_mobile = '0999999997'; $this->phone_mobile = '0999999997';
@ -2372,6 +2387,8 @@ class Adherent extends CommonObject
if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town; if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town;
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code; if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
if ($this->skype && ! empty($conf->global->LDAP_MEMBER_FIELD_SKYPE)) $info[$conf->global->LDAP_MEMBER_FIELD_SKYPE] = $this->skype; if ($this->skype && ! empty($conf->global->LDAP_MEMBER_FIELD_SKYPE)) $info[$conf->global->LDAP_MEMBER_FIELD_SKYPE] = $this->skype;
if ($this->twitter && ! empty($conf->global->LDAP_MEMBER_FIELD_TWITTER)) $info[$conf->global->LDAP_MEMBER_FIELD_TWITTER] = $this->twitter;
if ($this->facebook && ! empty($conf->global->LDAP_MEMBER_FIELD_FACEBOOK)) $info[$conf->global->LDAP_MEMBER_FIELD_FACEBOOK] = $this->facebook;
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone; if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso; if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile; if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;

View File

@ -68,6 +68,8 @@ $search_phone_mobile=GETPOST("search_phone_mobile",'alpha');
$search_fax=GETPOST("search_fax",'alpha'); $search_fax=GETPOST("search_fax",'alpha');
$search_email=GETPOST("search_email",'alpha'); $search_email=GETPOST("search_email",'alpha');
$search_skype=GETPOST("search_skype",'alpha'); $search_skype=GETPOST("search_skype",'alpha');
$search_twitter=GETPOST("search_twitter",'alpha');
$search_facebook=GETPOST("search_facebook",'alpha');
$search_priv=GETPOST("search_priv",'alpha'); $search_priv=GETPOST("search_priv",'alpha');
$search_categ=GETPOST("search_categ",'int'); $search_categ=GETPOST("search_categ",'int');
$search_categ_thirdparty=GETPOST("search_categ_thirdparty",'int'); $search_categ_thirdparty=GETPOST("search_categ_thirdparty",'int');
@ -156,7 +158,9 @@ $arrayfields=array(
'p.phone_mobile'=>array('label'=>"PhoneMobile", 'checked'=>1), 'p.phone_mobile'=>array('label'=>"PhoneMobile", 'checked'=>1),
'p.fax'=>array('label'=>"Fax", 'checked'=>0), 'p.fax'=>array('label'=>"Fax", 'checked'=>0),
'p.email'=>array('label'=>"EMail", 'checked'=>1), 'p.email'=>array('label'=>"EMail", 'checked'=>1),
'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->skype->enabled))), 'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
'p.twitter'=>array('label'=>"Twitter", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
'p.facebook'=>array('label'=>"Facebook", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))),
'p.thirdparty'=>array('label'=>"ThirdParty", 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)), 'p.thirdparty'=>array('label'=>"ThirdParty", 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)),
'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200), 'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200),
'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500), 'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500),
@ -217,6 +221,8 @@ if (empty($reshook))
$search_fax=""; $search_fax="";
$search_email=""; $search_email="";
$search_skype=""; $search_skype="";
$search_twitter="";
$search_facebook="";
$search_priv=""; $search_priv="";
$search_status=-1; $search_status=-1;
$search_categ=''; $search_categ='';
@ -311,6 +317,8 @@ if (strlen($search_phone_pro)) $sql.= natural_search('p.phone', $search_pho
if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile); if (strlen($search_phone_mobile)) $sql.= natural_search('p.phone_mobile', $search_phone_mobile);
if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax); if (strlen($search_fax)) $sql.= natural_search('p.fax', $search_fax);
if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype); if (strlen($search_skype)) $sql.= natural_search('p.skype', $search_skype);
if (strlen($search_twitter)) $sql.= natural_search('p.twitter', $search_twitter);
if (strlen($search_facebook)) $sql.= natural_search('p.facebook', $search_facebook);
if (strlen($search_email)) $sql.= natural_search('p.email', $search_email); if (strlen($search_email)) $sql.= natural_search('p.email', $search_email);
if (strlen($search_zip)) $sql.= natural_search("p.zip",$search_zip); if (strlen($search_zip)) $sql.= natural_search("p.zip",$search_zip);
if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status); if ($search_status != '' && $search_status >= 0) $sql.= " AND p.statut = ".$db->escape($search_status);
@ -601,6 +609,18 @@ if (! empty($arrayfields['p.skype']['checked']))
print '<input class="flat" type="text" name="search_skype" size="6" value="'.dol_escape_htmltag($search_skype).'">'; print '<input class="flat" type="text" name="search_skype" size="6" value="'.dol_escape_htmltag($search_skype).'">';
print '</td>'; print '</td>';
} }
if (! empty($arrayfields['p.twitter']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_twitter" size="6" value="'.dol_escape_htmltag($search_twitter).'">';
print '</td>';
}
if (! empty($arrayfields['p.facebook']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_facebook" size="6" value="'.dol_escape_htmltag($search_facebook).'">';
print '</td>';
}
if (! empty($arrayfields['p.thirdparty']['checked'])) if (! empty($arrayfields['p.thirdparty']['checked']))
{ {
print '<td class="liste_titre">'; print '<td class="liste_titre">';
@ -671,6 +691,8 @@ if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field
if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'],$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'],$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'],$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'],$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($arrayfields['p.skype']['label'],$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($arrayfields['p.skype']['label'],$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder);
if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'],$_SERVER["PHP_SELF"],"p.twitter", $begin, $param, '', $sortfield,$sortorder);
if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'],$_SERVER["PHP_SELF"],"p.facebook", $begin, $param, '', $sortfield,$sortorder);
if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'],$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder); if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'],$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder);
if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'],$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder); if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'],$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
// Extra fields // Extra fields
@ -801,7 +823,19 @@ while ($i < min($num,$limit))
// Skype // Skype
if (! empty($arrayfields['p.skype']['checked'])) if (! empty($arrayfields['p.skype']['checked']))
{ {
if (! empty($conf->skype->enabled)) { print '<td>'.dol_print_skype($obj->skype,$obj->rowid,$obj->socid,'AC_SKYPE',18).'</td>'; } if (! empty($conf->socialnetworks->enabled)) { print '<td>'.dol_print_socialnetworks($obj->skype,$obj->rowid,$obj->socid,'skype').'</td>'; }
if (! $i) $totalarray['nbfield']++;
}
// Twitter
if (! empty($arrayfields['p.twitter']['checked']))
{
if (! empty($conf->socialnetworks->enabled)) { print '<td>'.dol_print_socialnetworks($obj->twitter,$obj->rowid,$obj->socid,'twitter').'</td>'; }
if (! $i) $totalarray['nbfield']++;
}
// Facebook
if (! empty($arrayfields['p.facebook']['checked']))
{
if (! empty($conf->socialnetworks->enabled)) { print '<td>'.dol_print_socialnetworks($obj->facebook,$obj->rowid,$obj->socid,'facebook').'</td>'; }
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
// Company // Company

View File

@ -425,7 +425,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
if (empty($actiontypecode)) $actiontypecode='AC_OTH_AUTO'; // Event insert into agenda automatically if (empty($actiontypecode)) $actiontypecode='AC_OTH_AUTO'; // Event insert into agenda automatically
$object->socid = $sendtosocid; // To link to a company $object->socid = $sendtosocid; // To link to a company
$object->sendtoid = $sendtoid; // To link to contacts/addresses. This is an array. $object->sendtoid = $sendtoid; // To link to contact addresses. This is an array.
$object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) $object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
$object->actionmsg = $actionmsg; // Long text $object->actionmsg = $actionmsg; // Long text
$object->actionmsg2 = $actionmsg2; // Short text $object->actionmsg2 = $actionmsg2; // Short text

View File

@ -609,12 +609,23 @@ abstract class CommonObject
$out.=dol_print_url($this->url,'_goout',0,1); $out.=dol_print_url($this->url,'_goout',0,1);
$outdone++; $outdone++;
} }
if (! empty($conf->skype->enabled)) $out.='<div style="clear: both;">';
if (! empty($conf->socialnetworks->enabled))
{ {
$out.='<div style="clear: both;"></div>'; if ($this->skype) $out.=dol_print_socialnetworks($this->skype,$this->id,$object->id,'skype');
if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
$outdone++; $outdone++;
} }
if (! empty($conf->socialnetworks->enabled))
{
if ($this->twitter) $out.=dol_print_socialnetworks($this->twitter,$this->id,$object->id,'twitter');
$outdone++;
}
if (! empty($conf->socialnetworks->enabled))
{
if ($this->facebook) $out.=dol_print_socialnetworks($this->facebook,$this->id,$object->id,'facebook');
$outdone++;
}
$out.='</div>';
$out.='<!-- END Part to show address block -->'; $out.='<!-- END Part to show address block -->';

View File

@ -2189,50 +2189,52 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
} }
/** /**
* Show Skype link * Show social network link
* *
* @param string $skype Skype to show (only skype, without 'Name of recipient' before) * @param string $value Skype to show (only skype, without 'Name of recipient' before)
* @param int $cid Id of contact if known * @param int $cid Id of contact if known
* @param int $socid Id of third party if known * @param int $socid Id of third party if known
* @param int $addlink 0=no link to create action * @param string $type 'skype','facebook',...
* @param int $max Max number of characters to show
* @return string HTML Link * @return string HTML Link
*/ */
function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) function dol_print_socialnetworks($value,$cid,$socid,$type)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;
$newskype=$skype; $newskype=$value;
if (empty($skype)) return '&nbsp;'; if (empty($value)) return '&nbsp;';
if (! empty($addlink)) if (! empty($type))
{ {
$newskype =img_picto($langs->trans("Skype"), 'object_skype.png'); $newskype ='<div class="divsocialnetwork inline-block valignmiddle">';
$newskype.= '&nbsp;'; $newskype.=img_picto($langs->trans(strtoupper($type)), $type.'.png', '', false, 0, 0, '', 'paddingright');
$newskype.=dol_trunc($skype,$max); $newskype.=$value;
$newskype.= '&nbsp;'; if ($type == 'skype')
$newskype.='<a href="skype:';
$newskype.=dol_trunc($skype,$max);
$newskype.='?call" alt="'.$langs->trans("Call").'&nbsp;'.$skype.'" title="'.$langs->trans("Call").'&nbsp;'.$skype.'">';
$newskype.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_callbutton.png" border="0">';
$newskype.='</a>&nbsp;&nbsp;&nbsp;<a href="skype:';
$newskype.=dol_trunc($skype,$max);
$newskype.='?chat" alt="'.$langs->trans("Chat").'&nbsp;'.$skype.'" title="'.$langs->trans("Chat").'&nbsp;'.$skype.'">';
$newskype.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_chatbutton.png" border="0">';
$newskype.='</a>';
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
{ {
$type='AC_SKYPE'; $link=''; $newskype.= '&nbsp;';
if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&amp;backtopage=1&amp;actioncode='.$type.'&amp;contactid='.$cid.'&amp;socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>'; $newskype.='<a href="skype:';
$newskype='<div class="divskype nowrap">'.$newskype.($link?' '.$link:'').'</div>'; $newskype.=$value;
$newskype.='?call" alt="'.$langs->trans("Call").'&nbsp;'.$value.'" title="'.$langs->trans("Call").'&nbsp;'.$value.'">';
$newskype.='<img src="'.DOL_URL_ROOT.'/theme/common/skype_callbutton.png" border="0">';
$newskype.='</a><a href="skype:';
$newskype.=$value;
$newskype.='?chat" alt="'.$langs->trans("Chat").'&nbsp;'.$value.'" title="'.$langs->trans("Chat").'&nbsp;'.$value.'">';
$newskype.='<img class="paddingleft" src="'.DOL_URL_ROOT.'/theme/common/skype_chatbutton.png" border="0">';
$newskype.='</a>';
} }
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create && $type=='skype')
{
$addlink='AC_SKYPE'; $link='';
if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&amp;backtopage=1&amp;actioncode='.$addlink.'&amp;contactid='.$cid.'&amp;socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
$newskype.=($link?' '.$link:'');
}
$newskype.='</div>';
} }
else else
{ {
$langs->load("errors"); $langs->load("errors");
$newskype.=img_warning($langs->trans("ErrorBadSkype",$skype)); $newskype.=img_warning($langs->trans("ErrorBadSocialNetworkValue",$value));
} }
return $newskype; return $newskype;
} }
@ -3151,11 +3153,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on'))) //if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
if (empty($srconly) && in_array($pictowithoutext, array( if (empty($srconly) && in_array($pictowithoutext, array(
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
'note','switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow') 'note','switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
)) { 'skype','twitter','facebook'
)
)) {
$fakey = $pictowithoutext; $fakey = $pictowithoutext;
$facolor = ''; $fasize = ''; $facolor = ''; $fasize = '';
$marginleftonlyshort = 0; $marginleftonlyshort = 2;
if ($pictowithoutext == 'switch_off') { if ($pictowithoutext == 'switch_off') {
$fakey = 'fa-toggle-off'; $fakey = 'fa-toggle-off';
$facolor = '#999'; $facolor = '#999';
@ -3237,12 +3241,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
else { else {
$fakey = 'fa-'.$pictowithoutext; $fakey = 'fa-'.$pictowithoutext;
$facolor = '#444'; $facolor = '#444';
$marginleftonlyshort=0;
} }
if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) { if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) {
$morecss.= ($morecss?' ':'').$reg[1]; $morecss.= ($morecss?' ':'').$reg[1];
} }
$enabledisablehtml = '<span class="fa '.$fakey.' '.($marginleftonlyshort?'marginleftonlyshort':'marginleftonly').' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'"'.(($notitle || empty($title))?'':' title="'.dol_escape_htmltag($title).'"').($moreatt?' '.$moreatt:'').'>'; $enabledisablehtml = '<span class="fa '.$fakey.' '.($marginleftonlyshort?($marginleftonlyshort==1?'marginleftonlyshort':'marginleftonly'):'').' valignmiddle'.($morecss?' '.$morecss:'').'" style="'.($fasize?('font-size: '.$fasize.';'):'').($facolor?(' color: '.$facolor.';'):'').'" alt="'.dol_escape_htmltag($titlealt).'"'.(($notitle || empty($title))?'':' title="'.dol_escape_htmltag($title).'"').($moreatt?' '.$moreatt:'').'>';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
$enabledisablehtml.= $titlealt; $enabledisablehtml.= $titlealt;
} }

View File

@ -898,7 +898,7 @@ DictionaryVAT=VAT Rates or Sales Tax Rates
DictionaryRevenueStamp=Amount of tax stamps DictionaryRevenueStamp=Amount of tax stamps
DictionaryPaymentConditions=Payment terms DictionaryPaymentConditions=Payment terms
DictionaryPaymentModes=Payment modes DictionaryPaymentModes=Payment modes
DictionaryTypeContact=Contact/Address types DictionaryTypeContact=Contact address types
DictionaryTypeOfContainer=Type of website pages/containers DictionaryTypeOfContainer=Type of website pages/containers
DictionaryEcotaxe=Ecotax (WEEE) DictionaryEcotaxe=Ecotax (WEEE)
DictionaryPaperFormat=Paper formats DictionaryPaperFormat=Paper formats
@ -1137,7 +1137,7 @@ ExtraFieldsLinesRec=Complementary attributes (templates invoices lines)
ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines) ExtraFieldsSupplierOrdersLines=Complementary attributes (order lines)
ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines) ExtraFieldsSupplierInvoicesLines=Complementary attributes (invoice lines)
ExtraFieldsThirdParties=Complementary attributes (thirdparty) ExtraFieldsThirdParties=Complementary attributes (thirdparty)
ExtraFieldsContacts=Complementary attributes (contact/address) ExtraFieldsContacts=Complementary attributes (contact address)
ExtraFieldsMember=Complementary attributes (member) ExtraFieldsMember=Complementary attributes (member)
ExtraFieldsMemberType=Complementary attributes (member type) ExtraFieldsMemberType=Complementary attributes (member type)
ExtraFieldsCustomerInvoices=Complementary attributes (invoices) ExtraFieldsCustomerInvoices=Complementary attributes (invoices)
@ -1695,7 +1695,7 @@ ListOfNotificationsPerUser=List of notifications per user*
ListOfNotificationsPerUserOrContact=List of notifications per user* or per contact** ListOfNotificationsPerUserOrContact=List of notifications per user* or per contact**
ListOfFixedNotifications=List of fixed notifications ListOfFixedNotifications=List of fixed notifications
GoOntoUserCardToAddMore=Go on the tab "Notifications" of a user to add or remove notifications for users GoOntoUserCardToAddMore=Go on the tab "Notifications" of a user to add or remove notifications for users
GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contacts/addresses GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contact addresses
Threshold=Threshold Threshold=Threshold
BackupDumpWizard=Wizard to build database backup dump file BackupDumpWizard=Wizard to build database backup dump file
SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason:

View File

@ -15,7 +15,7 @@ BoxLastSuppliers=Latest modified suppliers
BoxLastCustomerOrders=Latest customer orders BoxLastCustomerOrders=Latest customer orders
BoxLastActions=Latest actions BoxLastActions=Latest actions
BoxLastContracts=Latest contracts BoxLastContracts=Latest contracts
BoxLastContacts=Latest contacts/addresses BoxLastContacts=Latest contact addresses
BoxLastMembers=Latest members BoxLastMembers=Latest members
BoxFicheInter=Latest interventions BoxFicheInter=Latest interventions
BoxCurrentAccounts=Open accounts balance BoxCurrentAccounts=Open accounts balance
@ -34,7 +34,7 @@ BoxTitleLastFicheInter=Latest %s modified interventions
BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid
BoxTitleOldestUnpaidSupplierBills=Supplier Invoices: oldest %s unpaid BoxTitleOldestUnpaidSupplierBills=Supplier Invoices: oldest %s unpaid
BoxTitleCurrentAccounts=Open Accounts: balances BoxTitleCurrentAccounts=Open Accounts: balances
BoxTitleLastModifiedContacts=Contacts/Addresses: latest %s modified BoxTitleLastModifiedContacts=Contact addresses: latest %s modified
BoxMyLastBookmarks=Bookmarks: latest %s modified BoxMyLastBookmarks=Bookmarks: latest %s modified
BoxOldestExpiredServices=Oldest active expired services BoxOldestExpiredServices=Oldest active expired services
BoxLastExpiredServices=Latest %s oldest contacts with active expired services BoxLastExpiredServices=Latest %s oldest contacts with active expired services

View File

@ -3,7 +3,7 @@ ErrorCompanyNameAlreadyExists=Company name %s already exists. Choose another one
ErrorSetACountryFirst=Set the country first ErrorSetACountryFirst=Set the country first
SelectThirdParty=Select a third party SelectThirdParty=Select a third party
ConfirmDeleteCompany=Are you sure you want to delete this company and all inherited information? ConfirmDeleteCompany=Are you sure you want to delete this company and all inherited information?
DeleteContact=Delete a contact/address DeleteContact=Delete a contact address
ConfirmDeleteContact=Are you sure you want to delete this contact and all inherited information? ConfirmDeleteContact=Are you sure you want to delete this contact and all inherited information?
MenuNewThirdParty=New Third Party MenuNewThirdParty=New Third Party
MenuNewCustomer=New Customer MenuNewCustomer=New Customer
@ -19,9 +19,9 @@ ProspectionArea=Prospection area
IdThirdParty=Id third party IdThirdParty=Id third party
IdCompany=Company Id IdCompany=Company Id
IdContact=Contact Id IdContact=Contact Id
Contacts=Contacts/Addresses Contacts=Contact addresses
ThirdPartyContacts=Third party contacts ThirdPartyContacts=Third party contact addresses
ThirdPartyContact=Third party contact/address ThirdPartyContact=Third party contact address
Company=Company Company=Company
CompanyName=Company name CompanyName=Company name
AliasNames=Alias name (commercial, trademark, ...) AliasNames=Alias name (commercial, trademark, ...)
@ -40,7 +40,7 @@ ThirdPartyCustomersWithIdProf12=Customers with %s or %s
ThirdPartySuppliers=Vendors ThirdPartySuppliers=Vendors
ThirdPartyType=Type of company ThirdPartyType=Type of company
Individual=Private individual Individual=Private individual
ToCreateContactWithSameName=Will create automatically a contact/address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough. ToCreateContactWithSameName=Will create automatically a contact address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough.
ParentCompany=Parent company ParentCompany=Parent company
Subsidiaries=Subsidiaries Subsidiaries=Subsidiaries
ReportByMonth=Report by month ReportByMonth=Report by month
@ -289,16 +289,16 @@ SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself)
DiscountNone=None DiscountNone=None
Supplier=Vendor Supplier=Vendor
AddContact=Create contact AddContact=Create contact
AddContactAddress=Create contact/address AddContactAddress=Create contact address
EditContact=Edit contact EditContact=Edit contact
EditContactAddress=Edit contact/address EditContactAddress=Edit contact address
Contact=Contact Contact=Contact
ContactId=Contact id ContactId=Contact id
ContactsAddresses=Contacts/Addresses ContactsAddresses=Contact addresses
FromContactName=Name: FromContactName=Name:
NoContactDefinedForThirdParty=No contact defined for this third party NoContactDefinedForThirdParty=No contact defined for this third party
NoContactDefined=No contact defined NoContactDefined=No contact defined
DefaultContact=Default contact/address DefaultContact=Default contact address
AddThirdParty=Create third party AddThirdParty=Create third party
DeleteACompany=Delete a company DeleteACompany=Delete a company
PersonalInformations=Personal data PersonalInformations=Personal data
@ -315,8 +315,8 @@ ValidityControledByModule=Validity controlled by module
ThisIsModuleRules=This is rules for this module ThisIsModuleRules=This is rules for this module
ProspectToContact=Prospect to contact ProspectToContact=Prospect to contact
CompanyDeleted=Company "%s" deleted from database. CompanyDeleted=Company "%s" deleted from database.
ListOfContacts=List of contacts/addresses ListOfContacts=List of contact addresses
ListOfContactsAddresses=List of contacts/addresses ListOfContactsAddresses=List of contact addresses
ListOfThirdParties=List of Third Parties ListOfThirdParties=List of Third Parties
ShowCompany=Show Third Party ShowCompany=Show Third Party
ShowContact=Show contact ShowContact=Show contact
@ -333,7 +333,7 @@ NoContactForAnyProposal=This contact is not a contact for any commercial proposa
NoContactForAnyContract=This contact is not a contact for any contract NoContactForAnyContract=This contact is not a contact for any contract
NoContactForAnyInvoice=This contact is not a contact for any invoice NoContactForAnyInvoice=This contact is not a contact for any invoice
NewContact=New contact NewContact=New contact
NewContactAddress=New Contact/Address NewContactAddress=New Contact address
MyContacts=My contacts MyContacts=My contacts
Capital=Capital Capital=Capital
CapitalOf=Capital of %s CapitalOf=Capital of %s
@ -390,7 +390,7 @@ NoDolibarrAccess=No Dolibarr access
ExportDataset_company_1=Third Parties (companies/foundations/physical people) and their properties ExportDataset_company_1=Third Parties (companies/foundations/physical people) and their properties
ExportDataset_company_2=Contacts and their properties ExportDataset_company_2=Contacts and their properties
ImportDataset_company_1=Third Parties (companies/foundations/physical people) and their properties ImportDataset_company_1=Third Parties (companies/foundations/physical people) and their properties
ImportDataset_company_2=Contacts/Addresses and attributes ImportDataset_company_2=Contact addresses and attributes
ImportDataset_company_3=Bank accounts of Third Parties ImportDataset_company_3=Bank accounts of Third Parties
ImportDataset_company_4=Third Parties - sales representatives (assign sales representatives/users to companies) ImportDataset_company_4=Third Parties - sales representatives (assign sales representatives/users to companies)
PriceLevel=Price level PriceLevel=Price level
@ -409,7 +409,7 @@ YouMustCreateContactFirst=To be able to add email notifications, you must first
ListSuppliersShort=List of Vendors ListSuppliersShort=List of Vendors
ListProspectsShort=List of Prospects ListProspectsShort=List of Prospects
ListCustomersShort=List of Customers ListCustomersShort=List of Customers
ThirdPartiesArea=Third Parties/Contacts ThirdPartiesArea=Third Parties and Contacts addresses area
LastModifiedThirdParties=Last %s modified Third Parties LastModifiedThirdParties=Last %s modified Third Parties
UniqueThirdParties=Total of Third Parties UniqueThirdParties=Total of Third Parties
InActivity=Open InActivity=Open

View File

@ -99,7 +99,7 @@ MailSelectedRecipients=Selected recipients
MailingArea=EMailings area MailingArea=EMailings area
LastMailings=Latest %s emailings LastMailings=Latest %s emailings
TargetsStatistics=Targets statistics TargetsStatistics=Targets statistics
NbOfCompaniesContacts=Unique contacts/addresses NbOfCompaniesContacts=Unique contact addresses
MailNoChangePossible=Recipients for validated emailing can't be changed MailNoChangePossible=Recipients for validated emailing can't be changed
SearchAMailing=Search mailing SearchAMailing=Search mailing
SendMailing=Send emailing SendMailing=Send emailing
@ -138,7 +138,7 @@ NbOfTargetedContacts=Current number of targeted contact emails
UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;firstname;other</strong> UseFormatFileEmailToTarget=Imported file must have format <strong>email;name;firstname;other</strong>
UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong> UseFormatInputEmailToTarget=Enter a string with format <strong>email;name;firstname;other</strong>
MailAdvTargetRecipients=Recipients (advanced selection) MailAdvTargetRecipients=Recipients (advanced selection)
AdvTgtTitle=Fill input fields to preselect the third parties or contacts/addresses to target AdvTgtTitle=Fill input fields to preselect the third parties or contact addresses to target
AdvTgtSearchTextHelp=Use %% as wildcards. For example to find all item like <b>jean, joe, jim</b>, you can input <b>j%%</b>, you can also use ; as separator for value, and use ! for except this value. For example <b>jean;joe;jim%%;!jimo;!jima%</b> will target all jean, joe, start with jim but not jimo and not everything that starts with jima AdvTgtSearchTextHelp=Use %% as wildcards. For example to find all item like <b>jean, joe, jim</b>, you can input <b>j%%</b>, you can also use ; as separator for value, and use ! for except this value. For example <b>jean;joe;jim%%;!jimo;!jima%</b> will target all jean, joe, start with jim but not jimo and not everything that starts with jima
AdvTgtSearchIntHelp=Use interval to select int or float value AdvTgtSearchIntHelp=Use interval to select int or float value
AdvTgtMinVal=Minimum value AdvTgtMinVal=Minimum value
@ -159,8 +159,8 @@ AdvTgtDeleteFilter=Delete filter
AdvTgtSaveFilter=Save filter AdvTgtSaveFilter=Save filter
AdvTgtCreateFilter=Create filter AdvTgtCreateFilter=Create filter
AdvTgtOrCreateNewFilter=Name of new filter AdvTgtOrCreateNewFilter=Name of new filter
NoContactWithCategoryFound=No contact/address with a category found NoContactWithCategoryFound=No contact address with a category found
NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact address with a category found
OutGoingEmailSetup=Outgoing email setup OutGoingEmailSetup=Outgoing email setup
InGoingEmailSetup=Incoming email setup InGoingEmailSetup=Incoming email setup
OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing) OutGoingEmailSetupForEmailing=Outgoing email setup (for mass emailing)

View File

@ -434,7 +434,7 @@ LatestLinkedEvents=Latest %s linked events
CompanyFoundation=Company/Organization CompanyFoundation=Company/Organization
Accountant=Accountant Accountant=Accountant
ContactsForCompany=Contacts for this third party ContactsForCompany=Contacts for this third party
ContactsAddressesForCompany=Contacts/addresses for this third party ContactsAddressesForCompany=Contact addresses for this third party
AddressesForCompany=Addresses for this third party AddressesForCompany=Addresses for this third party
ActionsOnCompany=Events about this third party ActionsOnCompany=Events about this third party
ActionsOnMember=Events about this member ActionsOnMember=Events about this member

View File

@ -1063,6 +1063,39 @@ else
$("#TypeName").html(document.formsoc.LastName.value); $("#TypeName").html(document.formsoc.LastName.value);
document.formsoc.private.value=1; document.formsoc.private.value=1;
}); });
init_customer_categ();
$("#customerprospect").change(function() {
init_customer_categ();
});
function init_customer_categ() {
console.log("is customer or prospect = "+jQuery("#customerprospect").val());
if (jQuery("#customerprospect").val() == 0 && (jQuery("#fournisseur").val() == 0 || '.(empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER)?'1':'0').'))
{
jQuery(".visibleifcustomer").hide();
}
else
{
jQuery(".visibleifcustomer").show();
}
}
init_supplier_categ();
$("#fournisseur").change(function() {
init_supplier_categ();
});
function init_supplier_categ() {
console.log("is supplier = "+jQuery("#fournisseur").val());
if (jQuery("#fournisseur").val() == 0)
{
jQuery(".visibleifsupplier").hide();
}
else
{
jQuery(".visibleifsupplier").show();
}
}
$("#selectcountry_id").change(function() { $("#selectcountry_id").change(function() {
document.formsoc.action.value="create"; document.formsoc.action.value="create";
document.formsoc.submit(); document.formsoc.submit();
@ -1421,22 +1454,20 @@ else
$langs->load('categories'); $langs->load('categories');
// Customer // Customer
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) { //if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
print '<tr><td class="toptd">' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td><td colspan="3">'; print '<tr class="visibleifcustomer"><td class="toptd">' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td><td colspan="3">';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
null, "90%"); print "</td></tr>";
print "</td></tr>"; //}
}
// Supplier // Supplier
if ($object->fournisseur) { //if ($object->fournisseur) {
print '<tr><td class="toptd">' . fieldLabel('SuppliersCategoriesShort', 'suppcats') . '</td><td colspan="3">'; print '<tr class="visibleifsupplier"><td class="toptd">' . fieldLabel('SuppliersCategoriesShort', 'suppcats') . '</td><td colspan="3">';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1); $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1);
print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, null, "90%");
null, "90%"); print "</td></tr>";
print "</td></tr>"; //}
}
} }
// Multicurrency // Multicurrency
@ -1488,11 +1519,6 @@ else
} }
elseif ($action == 'edit') elseif ($action == 'edit')
{ {
/*
* Edition
*/
//print load_fiche_titre($langs->trans("EditCompany")); //print load_fiche_titre($langs->trans("EditCompany"));
if ($socid) if ($socid)
@ -1612,8 +1638,10 @@ else
$sub2=0; $sub2=0;
}else{$sub2=1;} }else{$sub2=1;}
print "\n".'<script type="text/javascript">'; if ($conf->use_javascript_ajax)
print '$(document).ready(function () { {
print "\n".'<script type="text/javascript">';
print '$(document).ready(function () {
var val='.$sub.'; var val='.$sub.';
var val2='.$sub2.'; var val2='.$sub2.';
if("#localtax1assuj_value".value==undefined){ if("#localtax1assuj_value".value==undefined){
@ -1647,19 +1675,44 @@ else
} }
}); });
});'; init_customer_categ();
print '</script>'."\n"; $("#customerprospect").change(function() {
init_customer_categ();
});
function init_customer_categ() {
console.log("is customer or prospect = "+jQuery("#customerprospect").val());
if (jQuery("#customerprospect").val() == 0 && (jQuery("#fournisseur").val() == 0 || '.(empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER)?'1':'0').'))
{
jQuery(".visibleifcustomer").hide();
}
else
{
jQuery(".visibleifcustomer").show();
}
}
init_supplier_categ();
$("#fournisseur").change(function() {
init_supplier_categ();
});
function init_supplier_categ() {
console.log("is supplier = "+jQuery("#fournisseur").val());
if (jQuery("#fournisseur").val() == 0)
{
jQuery(".visibleifsupplier").hide();
}
else
{
jQuery(".visibleifsupplier").show();
}
};
if ($conf->use_javascript_ajax) $("#selectcountry_id").change(function() {
{ document.formsoc.action.value="edit";
print "\n".'<script type="text/javascript" language="javascript">'; document.formsoc.submit();
print '$(document).ready(function () { });
$("#selectcountry_id").change(function() {
document.formsoc.action.value="edit"; })';
document.formsoc.submit();
});
})';
print '</script>'."\n"; print '</script>'."\n";
} }
@ -2022,34 +2075,30 @@ else
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{ {
// Customer // Customer
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) { print '<tr class="visibleifcustomer"><td>' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td>';
print '<tr><td>' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td>'; print '<td colspan="3">';
print '<td colspan="3">'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1); $c = new Categorie($db);
$c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_CUSTOMER);
$cats = $c->containing($object->id, Categorie::TYPE_CUSTOMER); $arrayselected=array();
$arrayselected=array(); foreach ($cats as $cat) {
foreach ($cats as $cat) { $arrayselected[] = $cat->id;
$arrayselected[] = $cat->id;
}
print $form->multiselectarray('custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print "</td></tr>";
} }
print $form->multiselectarray('custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print "</td></tr>";
// Supplier // Supplier
if ($object->fournisseur) { print '<tr class="visibleifsupplier"><td>' . fieldLabel('SuppliersCategoriesShort', 'suppcats') . '</td>';
print '<tr><td>' . fieldLabel('SuppliersCategoriesShort', 'suppcats') . '</td>'; print '<td colspan="3">';
print '<td colspan="3">'; $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1);
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1); $c = new Categorie($db);
$c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER);
$cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER); $arrayselected=array();
$arrayselected=array(); foreach ($cats as $cat) {
foreach ($cats as $cat) { $arrayselected[] = $cat->id;
$arrayselected[] = $cat->id;
}
print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print "</td></tr>";
} }
print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
print "</td></tr>";
} }
// Multicurrency // Multicurrency

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2014 Charles-Fr Benke <charles.fr@benke.fr> * Copyright (C) 2014 Charles-Fr Benke <charles.fr@benke.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>

View File

@ -696,6 +696,9 @@ textarea.centpercent {
height: 28px; height: 28px;
vertical-align: middle; vertical-align: middle;
} }
.divsocialnetwork:not(:first-child) {
padding-left: 20px;
}
div.divsearchfield { div.divsearchfield {
float: <?php print $left; ?>; float: <?php print $left; ?>;
margin-<?php print $right; ?>: 12px; margin-<?php print $right; ?>: 12px;

View File

@ -689,6 +689,9 @@ textarea.centpercent {
height: 28px; height: 28px;
vertical-align: middle; vertical-align: middle;
} }
.divsocialnetwork:not(:first-child) {
padding-left: 20px;
}
div.divsearchfield { div.divsearchfield {
float: <?php print $left; ?>; float: <?php print $left; ?>;
margin-<?php print $right; ?>: 12px; margin-<?php print $right; ?>: 12px;

View File

@ -201,6 +201,8 @@ if (empty($reshook)) {
$object->office_fax = GETPOST("office_fax", 'alpha'); $object->office_fax = GETPOST("office_fax", 'alpha');
$object->user_mobile = GETPOST("user_mobile"); $object->user_mobile = GETPOST("user_mobile");
$object->skype = GETPOST("skype", 'alpha'); $object->skype = GETPOST("skype", 'alpha');
$object->twitter = GETPOST("twitter", 'alpha');
$object->facebook = GETPOST("facebook", 'alpha');
$object->email = preg_replace('/\s+/', '', GETPOST("email", 'alpha')); $object->email = preg_replace('/\s+/', '', GETPOST("email", 'alpha'));
$object->job = GETPOST("job", 'alpha'); $object->job = GETPOST("job", 'alpha');
$object->signature = GETPOST("signature"); $object->signature = GETPOST("signature");
@ -348,6 +350,8 @@ if (empty($reshook)) {
$object->office_fax = GETPOST("office_fax", 'alpha'); $object->office_fax = GETPOST("office_fax", 'alpha');
$object->user_mobile = GETPOST("user_mobile"); $object->user_mobile = GETPOST("user_mobile");
$object->skype = GETPOST("skype", 'alpha'); $object->skype = GETPOST("skype", 'alpha');
$object->twitter = GETPOST("twitter", 'alpha');
$object->facebook = GETPOST("facebook", 'alpha');
$object->email = preg_replace('/\s+/', '', GETPOST("email", 'alpha')); $object->email = preg_replace('/\s+/', '', GETPOST("email", 'alpha'));
$object->job = GETPOST("job", 'alpha'); $object->job = GETPOST("job", 'alpha');
$object->signature = GETPOST("signature",'none'); $object->signature = GETPOST("signature",'none');
@ -588,6 +592,8 @@ if (empty($reshook)) {
$ldap_fax = $attribute[$conf->global->LDAP_FIELD_FAX]; $ldap_fax = $attribute[$conf->global->LDAP_FIELD_FAX];
$ldap_mobile = $attribute[$conf->global->LDAP_FIELD_MOBILE]; $ldap_mobile = $attribute[$conf->global->LDAP_FIELD_MOBILE];
$ldap_skype = $attribute[$conf->global->LDAP_FIELD_SKYPE]; $ldap_skype = $attribute[$conf->global->LDAP_FIELD_SKYPE];
$ldap_twitter = $attribute[$conf->global->LDAP_FIELD_TWITTER];
$ldap_facebook = $attribute[$conf->global->LDAP_FIELD_FACEBOOK];
$ldap_mail = $attribute[$conf->global->LDAP_FIELD_MAIL]; $ldap_mail = $attribute[$conf->global->LDAP_FIELD_MAIL];
$ldap_sid = $attribute[$conf->global->LDAP_FIELD_SID]; $ldap_sid = $attribute[$conf->global->LDAP_FIELD_SID];
} }
@ -1000,7 +1006,7 @@ if ($action == 'create' || $action == 'adduserldap')
print '</td></tr>'; print '</td></tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->socialnetworks->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td>'; print '<tr><td>'.$langs->trans("Skype").'</td>';
print '<td>'; print '<td>';
@ -1011,7 +1017,41 @@ if ($action == 'create' || $action == 'adduserldap')
} }
else else
{ {
print '<input class="maxwidth200" type="text" name="skype" value="'.GETPOST('skype').'">'; print '<input class="maxwidth200" type="text" name="skype" value="'.GETPOST('skype','alpha').'">';
}
print '</td></tr>';
}
// Twitter
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Twitter").'</td>';
print '<td>';
if (! empty($ldap_twitter))
{
print '<input type="hidden" name="twitter" value="'.$ldap_twitter.'">';
print $ldap_twitter;
}
else
{
print '<input class="maxwidth200" type="text" name="twitter" value="'.GETPOST('twitter','alpha').'">';
}
print '</td></tr>';
}
// Facebook
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Facebook").'</td>';
print '<td>';
if (! empty($ldap_facebook))
{
print '<input type="hidden" name="facebook" value="'.$ldap_facebook.'">';
print $ldap_facebook;
}
else
{
print '<input class="maxwidth200" type="text" name="facebook" value="'.GETPOST('facebook','alpha').'">';
} }
print '</td></tr>'; print '</td></tr>';
} }
@ -2195,7 +2235,7 @@ else
print '</td></tr>'; print '</td></tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->socialnetworks->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td>'; print '<tr><td>'.$langs->trans("Skype").'</td>';
print '<td>'; print '<td>';
@ -2211,6 +2251,40 @@ else
print '</td></tr>'; print '</td></tr>';
} }
// Twitter
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Twitter").'</td>';
print '<td>';
if ($caneditfield && empty($object->ldap_sid))
{
print '<input size="40" type="text" name="twitter" class="flat" value="'.$object->twitter.'">';
}
else
{
print '<input type="hidden" name="twitter" value="'.$object->twitter.'">';
print $object->twitter;
}
print '</td></tr>';
}
// Skype
if (! empty($conf->socialnetworks->enabled))
{
print '<tr><td>'.$langs->trans("Facebook").'</td>';
print '<td>';
if ($caneditfield && empty($object->ldap_sid))
{
print '<input size="40" type="text" name="facebook" class="flat" value="'.$object->facebook.'">';
}
else
{
print '<input type="hidden" name="facebook" value="'.$object->facebook.'">';
print $object->facebook;
}
print '</td></tr>';
}
// EMail // EMail
print "<tr>".'<td'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>'; print "<tr>".'<td'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
print '<td>'; print '<td>';

View File

@ -69,7 +69,11 @@ class User extends CommonObject
public $gender; public $gender;
public $birth; public $birth;
public $email; public $email;
public $skype; public $skype;
public $twitter;
public $facebook;
public $job; // job position public $job; // job position
public $signature; public $signature;
@ -220,7 +224,8 @@ class User extends CommonObject
$login=trim($login); $login=trim($login);
// Get user // Get user
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.job, u.skype, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; $sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.job, u.skype, u.twitter, u.facebook,";
$sql.= " u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql.= " u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id,"; $sql.= " u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id,";
$sql.= " u.admin, u.login, u.note,"; $sql.= " u.admin, u.login, u.note,";
$sql.= " u.pass, u.pass_crypted, u.pass_temp, u.api_key,"; $sql.= " u.pass, u.pass_crypted, u.pass_temp, u.api_key,";
@ -325,6 +330,8 @@ class User extends CommonObject
$this->user_mobile = $obj->user_mobile; $this->user_mobile = $obj->user_mobile;
$this->email = $obj->email; $this->email = $obj->email;
$this->skype = $obj->skype; $this->skype = $obj->skype;
$this->twitter = $obj->twitter;
$this->facebook = $obj->facebook;
$this->job = $obj->job; $this->job = $obj->job;
$this->signature = $obj->signature; $this->signature = $obj->signature;
$this->admin = $obj->admin; $this->admin = $obj->admin;
@ -1220,6 +1227,8 @@ class User extends CommonObject
$this->gender = $contact->gender; $this->gender = $contact->gender;
$this->email = $contact->email; $this->email = $contact->email;
$this->skype = $contact->skype; $this->skype = $contact->skype;
$this->twitter = $contact->twitter;
$this->facebook = $contact->facebook;
$this->office_phone = $contact->phone_pro; $this->office_phone = $contact->phone_pro;
$this->office_fax = $contact->fax; $this->office_fax = $contact->fax;
$this->user_mobile = $contact->phone_mobile; $this->user_mobile = $contact->phone_mobile;
@ -1433,7 +1442,11 @@ class User extends CommonObject
$this->office_fax = trim($this->office_fax); $this->office_fax = trim($this->office_fax);
$this->user_mobile = trim($this->user_mobile); $this->user_mobile = trim($this->user_mobile);
$this->email = trim($this->email); $this->email = trim($this->email);
$this->skype = trim($this->skype); $this->skype = trim($this->skype);
$this->twitter = trim($this->twitter);
$this->facebook = trim($this->facebook);
$this->job = trim($this->job); $this->job = trim($this->job);
$this->signature = trim($this->signature); $this->signature = trim($this->signature);
$this->note = trim($this->note); $this->note = trim($this->note);
@ -1483,6 +1496,8 @@ class User extends CommonObject
$sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'"; $sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";
$sql.= ", email = '".$this->db->escape($this->email)."'"; $sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", skype = '".$this->db->escape($this->skype)."'"; $sql.= ", skype = '".$this->db->escape($this->skype)."'";
$sql.= ", twitter = '".$this->db->escape($this->twitter)."'";
$sql.= ", facebook = '".$this->db->escape($this->facebook)."'";
$sql.= ", job = '".$this->db->escape($this->job)."'"; $sql.= ", job = '".$this->db->escape($this->job)."'";
$sql.= ", signature = '".$this->db->escape($this->signature)."'"; $sql.= ", signature = '".$this->db->escape($this->signature)."'";
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'"; $sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
@ -1567,7 +1582,11 @@ class User extends CommonObject
$adh->country_id=$this->country_id; $adh->country_id=$this->country_id;
$adh->email=$this->email; $adh->email=$this->email;
$adh->skype=$this->skype; $adh->skype=$this->skype;
$adh->twitter=$this->twitter;
$adh->facebook=$this->facebook;
$adh->phone=$this->office_phone; $adh->phone=$this->office_phone;
$adh->phone_mobile=$this->user_mobile; $adh->phone_mobile=$this->user_mobile;
@ -1615,7 +1634,11 @@ class User extends CommonObject
//$tmpobj->societe=(empty($tmpobj->societe) && $this->societe_id ? $this->societe_id : $tmpobj->societe); //$tmpobj->societe=(empty($tmpobj->societe) && $this->societe_id ? $this->societe_id : $tmpobj->societe);
$tmpobj->email=$this->email; $tmpobj->email=$this->email;
$tmpobj->skype=$this->skype; $tmpobj->skype=$this->skype;
$tmpobj->twitter=$this->twitter;
$tmpobj->facebook=$this->facebook;
$tmpobj->phone_pro=$this->office_phone; $tmpobj->phone_pro=$this->office_phone;
$tmpobj->phone_mobile=$this->user_mobile; $tmpobj->phone_mobile=$this->user_mobile;
$tmpobj->fax=$this->office_fax; $tmpobj->fax=$this->office_fax;
@ -2474,13 +2497,15 @@ class User extends CommonObject
'LDAP_FIELD_NAME' => 'lastname', 'LDAP_FIELD_NAME' => 'lastname',
'LDAP_FIELD_FIRSTNAME' => 'firstname', 'LDAP_FIELD_FIRSTNAME' => 'firstname',
'LDAP_FIELD_LOGIN' => 'login', 'LDAP_FIELD_LOGIN' => 'login',
'LDAP_FIELD_LOGIN_SAMBA' => 'login', 'LDAP_FIELD_LOGIN_SAMBA'=> 'login',
'LDAP_FIELD_PHONE' => 'office_phone', 'LDAP_FIELD_PHONE' => 'office_phone',
'LDAP_FIELD_MOBILE' => 'user_mobile', 'LDAP_FIELD_MOBILE' => 'user_mobile',
'LDAP_FIELD_FAX' => 'office_fax', 'LDAP_FIELD_FAX' => 'office_fax',
'LDAP_FIELD_MAIL' => 'email', 'LDAP_FIELD_MAIL' => 'email',
'LDAP_FIELD_SID' => 'ldap_sid', 'LDAP_FIELD_SID' => 'ldap_sid',
'LDAP_FIELD_SKYPE' => 'skype' 'LDAP_FIELD_SKYPE' => 'skype',
'LDAP_FIELD_TWITTER' => 'twitter',
'LDAP_FIELD_FACEBOOK' => 'facebook'
); );
// Champs // Champs
@ -2591,7 +2616,9 @@ class User extends CommonObject
$this->gender='man'; $this->gender='man';
$this->note='This is a note'; $this->note='This is a note';
$this->email='email@specimen.com'; $this->email='email@specimen.com';
$this->skype='tom.hanson'; $this->skype='skypepseudo';
$this->twitter='twitterpseudo';
$this->facebook='facebookpseudo';
$this->office_phone='0999999999'; $this->office_phone='0999999999';
$this->office_fax='0999999998'; $this->office_fax='0999999998';
$this->user_mobile='0999999997'; $this->user_mobile='0999999997';
@ -2745,6 +2772,8 @@ class User extends CommonObject
$this->office_fax=$ldapuser->{$conf->global->LDAP_FIELD_FAX}; $this->office_fax=$ldapuser->{$conf->global->LDAP_FIELD_FAX};
$this->email=$ldapuser->{$conf->global->LDAP_FIELD_MAIL}; $this->email=$ldapuser->{$conf->global->LDAP_FIELD_MAIL};
$this->skype=$ldapuser->{$conf->global->LDAP_FIELD_SKYPE}; $this->skype=$ldapuser->{$conf->global->LDAP_FIELD_SKYPE};
$this->twitter=$ldapuser->{$conf->global->LDAP_FIELD_TWITTER};
$this->facebook=$ldapuser->{$conf->global->LDAP_FIELD_FACEBOOK};
$this->ldap_sid=$ldapuser->{$conf->global->LDAP_FIELD_SID}; $this->ldap_sid=$ldapuser->{$conf->global->LDAP_FIELD_SID};
$this->job=$ldapuser->{$conf->global->LDAP_FIELD_TITLE}; $this->job=$ldapuser->{$conf->global->LDAP_FIELD_TITLE};