diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index b532266ce31..319ba7ab9d9 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -585,7 +585,7 @@ if ($id > 0 || ! empty($ref)) $banklinestatic->fetch($links[$key]['url_id']); $bankstatic->id=$banklinestatic->fk_account; $bankstatic->label=$banklinestatic->bank_account_label; - print ' ('.$langs->trans("from").' '; + print ' ('.$langs->trans("TransferFrom").' '; print $bankstatic->getNomUrl(1,'transactions'); print ' '.$langs->trans("toward").' '; $bankstatic->id=$objp->bankid; @@ -597,7 +597,7 @@ if ($id > 0 || ! empty($ref)) { $bankstatic->id=$objp->bankid; $bankstatic->label=$objp->bankref; - print ' ('.$langs->trans("from").' '; + print ' ('.$langs->trans("TransferFrom").' '; print $bankstatic->getNomUrl(1,''); print ' '.$langs->trans("toward").' '; $banklinestatic->fetch($links[$key]['url_id']); diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 8d73250d652..13ebb3c79c2 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -487,6 +487,8 @@ Module2700Desc= Utilise le service en ligne Gravatar (www.gravatar.com) pour aff Module2800Desc=Client FTP Module2900Name= GeoIPMaxmind Module2900Desc= Capacités de conversion GeoIP Maxmind +Module3100Name= Skype +Module3100Desc= Ajouter un button Skype dans les fiches adhérents / tiers / contacts Module5000Name=Multi-société Module5000Desc=Permet de gérer plusieurs sociétés Module6000Name=Workflow diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index c6f7aa39ac8..cd7da345a57 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -66,6 +66,8 @@ Country=Pays CountryCode=Code pays CountryId=Identifiant pays Phone=Téléphone +Skype=Skype +Call=Appeler PhonePro=Tél pro. PhonePerso=Tél perso. PhoneMobile=Tél portable diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 65ea0dd73f1..b89c3904f74 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2005 Lionel Cousteix * Copyright (C) 2011 Herve Prot * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,6 +51,7 @@ class User extends CommonObject var $firstname; var $note; var $email; + var $skype; var $job; var $signature; var $office_phone; @@ -140,7 +142,7 @@ class User extends CommonObject $login=trim($login); // Get user - $sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.skype, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; $sql.= " u.admin, u.login, u.note,"; $sql.= " u.pass, u.pass_crypted, u.pass_temp,"; $sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid,"; @@ -203,6 +205,7 @@ class User extends CommonObject $this->office_fax = $obj->office_fax; $this->user_mobile = $obj->user_mobile; $this->email = $obj->email; + $this->skype = $obj->skype; $this->job = $obj->job; $this->signature = $obj->signature; $this->admin = $obj->admin; @@ -917,6 +920,7 @@ class User extends CommonObject $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; $this->email = $contact->email; + $this->skype = $contact->skype; $this->office_phone = $contact->phone_pro; $this->office_fax = $contact->fax; $this->user_mobile = $contact->phone_mobile; @@ -1110,6 +1114,7 @@ class User extends CommonObject $this->office_fax = trim($this->office_fax); $this->user_mobile = trim($this->user_mobile); $this->email = trim($this->email); + $this->skype = trim($this->skype); $this->job = trim($this->job); $this->signature = trim($this->signature); $this->note = trim($this->note); @@ -1145,6 +1150,7 @@ class User extends CommonObject $sql.= ", office_fax = '".$this->db->escape($this->office_fax)."'"; $sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'"; $sql.= ", email = '".$this->db->escape($this->email)."'"; + $sql.= ", skype = '".$this->db->escape($this->skype)."'"; $sql.= ", job = '".$this->db->escape($this->job)."'"; $sql.= ", signature = '".$this->db->escape($this->signature)."'"; $sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'"; @@ -1206,6 +1212,7 @@ class User extends CommonObject $adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe); $adh->email=$this->email; + $adh->skype=$this->skype; $adh->phone=$this->office_phone; $adh->phone_mobile=$this->user_mobile; @@ -1914,6 +1921,7 @@ class User extends CommonObject if ($this->office_fax && ! empty($conf->global->LDAP_FIELD_FAX)) $info[$conf->global->LDAP_FIELD_FAX] = $this->office_fax; if ($this->note && ! empty($conf->global->LDAP_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_FIELD_DESCRIPTION] = $this->note; if ($this->email && ! empty($conf->global->LDAP_FIELD_MAIL)) $info[$conf->global->LDAP_FIELD_MAIL] = $this->email; + if ($this->skype && ! empty($conf->global->LDAP_FIELD_SKYPE)) $info[$conf->global->LDAP_FIELD_SKYPE] = $this->skype; if ($conf->global->LDAP_SERVER_TYPE == 'egroupware') { @@ -1966,6 +1974,7 @@ class User extends CommonObject $this->firstname='SPECIMEN'; $this->note='This is a note'; $this->email='email@specimen.com'; + $this->skype='tom.hanson'; $this->office_phone='0999999999'; $this->office_fax='0999999998'; $this->user_mobile='0999999997'; @@ -2113,6 +2122,7 @@ class User extends CommonObject $this->user_mobile=$ldapuser->{$conf->global->LDAP_FIELD_MOBILE}; $this->office_fax=$ldapuser->{$conf->global->LDAP_FIELD_FAX}; $this->email=$ldapuser->{$conf->global->LDAP_FIELD_MAIL}; + $this->skype=$ldapuser->{$conf->global->LDAP_FIELD_SKYPE}; $this->ldap_sid=$ldapuser->{$conf->global->LDAP_FIELD_SID}; $this->job=$ldapuser->{$conf->global->LDAP_FIELD_TITLE}; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index caa0837f701..064cfcc9f24 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -8,6 +8,7 @@ * Copyright (C) 2011 Herve Prot * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -184,6 +185,7 @@ if ($action == 'add' && $canadduser) $object->office_phone = GETPOST("office_phone"); $object->office_fax = GETPOST("office_fax"); $object->user_mobile = GETPOST("user_mobile"); + $object->skype = GETPOST("skype"); $object->email = GETPOST("email"); $object->job = GETPOST("job"); $object->signature = GETPOST("signature"); @@ -321,10 +323,11 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->office_phone=GETPOST("office_phone"); $object->office_fax = GETPOST("office_fax"); $object->user_mobile= GETPOST("user_mobile"); + $object->skype =GETPOST("skype"); $object->email = GETPOST("email"); $object->job = GETPOST("job"); $object->signature = GETPOST("signature"); - $object->accountancy_code = GETPOST("accountancy_code"); + $object->accountancy_code = GETPOST("accountancy_code"); $object->openid = GETPOST("openid"); $object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0; @@ -520,6 +523,7 @@ if ($action == 'adduserldap') $conf->global->LDAP_FIELD_PHONE, $conf->global->LDAP_FIELD_FAX, $conf->global->LDAP_FIELD_MOBILE, + $conf->global->LDAP_FIELD_SKYPE, $conf->global->LDAP_FIELD_MAIL, $conf->global->LDAP_FIELD_TITLE, $conf->global->LDAP_FIELD_DESCRIPTION, @@ -548,6 +552,7 @@ if ($action == 'adduserldap') $ldap_phone = $attribute[$conf->global->LDAP_FIELD_PHONE]; $ldap_fax = $attribute[$conf->global->LDAP_FIELD_FAX]; $ldap_mobile = $attribute[$conf->global->LDAP_FIELD_MOBILE]; + $ldap_skype = $attribute[$conf->global->LDAP_FIELD_SKYPE]; $ldap_mail = $attribute[$conf->global->LDAP_FIELD_MAIL]; $ldap_sid = $attribute[$conf->global->LDAP_FIELD_SID]; } @@ -605,9 +610,10 @@ if (($action == 'create') || ($action == 'adduserldap')) $conf->global->LDAP_FIELD_LOGIN_SAMBA, $conf->global->LDAP_FIELD_PASSWORD, $conf->global->LDAP_FIELD_PASSWORD_CRYPTED, - $conf->global->LDAP_FIELD_PHONE, + $conf->global->LDAP_FIELD_PHONE, $conf->global->LDAP_FIELD_FAX, $conf->global->LDAP_FIELD_MOBILE, + $conf->global->LDAP_FIELD_SKYPE, $conf->global->LDAP_FIELD_MAIL, $conf->global->LDAP_FIELD_TITLE, $conf->global->LDAP_FIELD_DESCRIPTION, @@ -858,6 +864,23 @@ if (($action == 'create') || ($action == 'adduserldap')) print ''; } print ''; + + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").''; + print ''; + if (! empty($ldap_skype)) + { + print ''; + print $ldap_skype; + } + else + { + print ''; + } + print ''; + } // EMail print 'global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").''; @@ -1166,6 +1189,14 @@ else print ''.$langs->trans("Fax").''; print ''.dol_print_phone($object->office_fax,'',0,0,1).''; print ''."\n"; + + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").''; + print ''.dol_print_skype($object->skype,0,0,1).''; + print "\n"; + } // EMail print ''.$langs->trans("EMail").''; @@ -1761,6 +1792,23 @@ else } print ''; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''.$langs->trans("Skype").''; + print ''; + if ($caneditfield && empty($object->ldap_sid)) + { + print ''; + } + else + { + print ''; + print $object->skype; + } + print ''; + } + // EMail print "".'global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").''; print '';