diff --git a/ChangeLog b/ChangeLog index 0b6a4a5b871..fb67d07ec43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,8 +13,9 @@ make a Dolibarr upgrade. WARNING: Following changes may create regression for some external modules, but were necessary to make Dolibarr better: -- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use MAIN_OVERWRITE_TRANS_xx_YY instead. - +- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead. +- Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination. + ***** ChangeLog for 3.8 compared to 3.7.* ***** For users: diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index ef4eaefe9c2..e50a1a74a1b 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -73,5 +73,9 @@ else dol_print_error($db,'Error'); $found = 'Error'; } +//Greek to Latin +$greek = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ά','έ','ή','ί','ό','ύ','ώ','ϊ','ΐ','Ά','Έ','Ή','Ί','Ό','Ύ','Ώ','Ϊ'); -echo $found; +$latin = array('a','b','g','d','e','z','h','th','i','k','l','m','n','ks','o','p','r','s','s','t','u','f','ch','ps','w','A','B','G','D','E','Z','H','TH','I','K','L','M','N','KS','O','P','R','S','T','U','F','CH','PS','W','a','e','h','i','o','u','w','i','i','A','E','H','I','O','U','W','I'); + +print str_replace($greek, $latin, $found); diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index deed3b1b97a..9a04a431ac6 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ' '.$object->currency_code.''; - print ''.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).''; + print ''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''; print ' '; print ''; } else { diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 2db5523c5bd..63bc0f2b04d 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -4,10 +4,10 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -773,11 +773,14 @@ else print ''; - // Ref - print ''; - + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Lastname print ''; print ''; @@ -1040,23 +1043,32 @@ else } - print '
'.$langs->trans("Ref").''; - print $object->ref; - print '
'.$langs->trans("ID").''; + print $object->ref; + print '
lastname).'" autofocus="autofocus">
'; - $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + + print '
'; + print '
'; + + print '
'; + print '
'; + // Ref - print ''; // Name print ''; print ''; - + */ + // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; } - + */ + print ''; // Civility - print ''; // Role - print ''; + print ''; // Address + /* print ''; @@ -1112,68 +1127,72 @@ else // State if (empty($conf->global->SOCIETE_DISABLE_STATE)) { - print ''; - } + print ''; + }*/ // Phone + /* print ''; print ''; print ''; print ''; - + */ + // Email - print ''; + //print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; - print ''; + print ''; + print ''; } - else - { - print ''; - } - print ''; // Instant message and no email - print ''; + print ''; if (!empty($conf->mailing->enabled)) { - print ''; + print ''; } - else - { - print ''; - } - print ''; // Skype if (! empty($conf->skype->enabled)) { - print ''; + print ''; } - print ''; // Note Public - print ''; // Note Private - print ''; + print ''; + */ + + print '
'.$langs->trans("Ref").''; + /*print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'id', $linkback); print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; if ($object->socid > 0) { $objsoc->fetch($object->socid); @@ -1070,6 +1082,7 @@ else } // Photo + /* if ($object->photo) { print ''; @@ -1080,18 +1093,20 @@ else print ' '; print '
'.$langs->trans("UserTitle").''; + print '
'.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("Address").''; dol_print_address($object->address,'gmap','contact',$object->id); print '
'.$langs->trans('State').''.$object->state.'
'.$langs->trans('State').''.$object->state.'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
 
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("No_Email").''.yn($object->no_email).'
'.$langs->trans("No_Email").''.yn($object->no_email).'
 
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("ContactVisibility").''; + print '
'.$langs->trans("ContactVisibility").''; print $object->LibPubPriv($object->priv); print '
'.$langs->trans("NotePublic").''; + /* + print '
'.$langs->trans("NotePublic").''; print nl2br($object->note_public); print '
'.$langs->trans("NotePrivate").''; + print '
'.$langs->trans("NotePrivate").''; print nl2br($object->note_private); - - // Statut - print '
'.$langs->trans("Status").'
'; + + print ''; + print '
'; + + print '
'; + print ''; + + // Statut + /*print ''; print ''; print ''."\n"; - + */ + // Categories if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { print ''; @@ -1240,7 +1259,10 @@ else print ''; print "
'.$langs->trans("Status").''; print $object->getLibStatut(4); print '
' . $langs->trans( "Categories" ) . '
"; - + + print '
'; + print '
'; + print dol_fiche_end(); // Barre d'actions diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 3ad4f0779af..0250691e88d 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -32,36 +32,50 @@ $langs->load("companies"); // Security check -$contactid = GETPOST("id",'int'); +$id = GETPOST("id",'int'); if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe'); +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); -$contact = new Contact($db); +$object = new Contact($db); /* * View */ + +$form=new Form($db); + $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); -if ($contactid > 0) +if ($id > 0) { - $result = $contact->fetch($contactid, $user); + $result = $object->fetch($id, $user); - $contact->info($contactid); + $object->info($id); - $head = contact_prepare_head($contact); + $head = contact_prepare_head($object); dol_fiche_head($head, 'info', $title, 0, 'contact'); - // TODO Put here ref of card + $linkback = ''.$langs->trans("BackToList").''; - dol_print_object_info($contact); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + print '
'; + + print '
'; + + print '
'; + + dol_print_object_info($object); + + print '
'; + dol_fiche_end(); } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 6fa4e5c46a8..76a868a7888 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1332,7 +1332,7 @@ class Contrat extends CommonObject if (empty($error)) { // Call trigger - $result=$this->call_trigger('LINECONTRACT_CREATE',$user); + $result=$this->call_trigger('LINECONTRACT_INSERT',$user); if ($result < 0) { $this->db->rollback(); @@ -2644,7 +2644,7 @@ class ContratLigne extends CommonObjectLine if (!$notrigger) { // Call trigger - $result = $this->call_trigger('LINECONTRACT_CREATE', $user); + $result = $this->call_trigger('LINECONTRACT_INSERT', $user); if ($result < 0) { $this->db->rollback(); return -1; diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 67458fd401d..a4e83a0fd59 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -56,7 +56,7 @@ if (! empty($_POST['removedfile']) && empty($_POST['removAll'])) $upload_dir_tmp = $vardir.'/temp'; // TODO Delete only files that was uploaded from email form - dol_remove_file_process($_POST['removedfile'],0); + dol_remove_file_process(GETPOST('removedfile','alpha'),0); $action='presend'; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 76fd73a324d..419df05a679 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -437,53 +437,82 @@ abstract class CommonObject /** * Return full address of contact * - * @param Societe $object Object Societe or null + * @param string $htmlkey HTML id to make banner content unique + * @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member) * @return string Full address string */ - function getBannerAddress($htmlkey, $object=null) + function getBannerAddress($htmlkey, $object) { global $conf, $langs; $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); - $out=''; + $contacti=0; + $thirdpartyid=0; + if ($this->elemet == 'societe') + { + $thirdpartyid=$this->id; + } + if ($this->elemet == 'contact') + { + $contactid=$this->id; + $thirdpartyid=$object->fk_soc; + } + if ($this->elemet == 'user') + { + $contactid=$this->contact_id; + $thirdpartyid=$object->fk_soc; + } - $out.=''; + $out=''; $outdone=0; $coords = $this->getFullAddress(1,', '); - if (! empty($conf->use_javascript_ajax)) + if ($coords) { - $namecoords = $this->getFullName($langs,1).'
'.$coords; - // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile - $out.=''; - $out.=img_picto($langs->trans("Address"), 'object_address.png'); - $out.=' '; - } - if ($coords) { + if (! empty($conf->use_javascript_ajax)) + { + $namecoords = $this->getFullName($langs,1).'
'.$coords; + // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile + $out.=''; + $out.=img_picto($langs->trans("Address"), 'object_address.png'); + $out.=' '; + } $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++; $outdone++; } - if (! in_array($object->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) + if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) && ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { $out.=($outdone?'
':'').$this->state; $outdone++; } - - if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'
':''); - if ($this->phone_pro) { - $out.=dol_print_phone($this->phone_pro,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + + if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax || $this->office_phone || $this->user_mobile || $this->office_fax) $out.=($outdone?'
':''); + if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone + $out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; } - if ($this->phone_mobile) { - $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + if (! empty($this->phone_pro)) { + $out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; } - if ($this->phone_perso) { - $out.=dol_print_phone($this->phone_perso,$country_code['code'],$this->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; + if (! empty($this->phone_mobile)) { + $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; } - if ($this->fax) { - $out.=dol_print_phone($this->fax,$country_code['code'],$this->rowid,$object->id,'AC_FAX',' ','fax'); $outdone++; + if (! empty($this->phone_perso)) { + $out.=dol_print_phone($this->phone_perso,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePerso")); $outdone++; + } + if (! empty($this->fax)) { + $out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; + } + if (! empty($this->office_phone)) { + $out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->user_mobile)) { + $out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; + } + if (! empty($this->office_fax)) { + $out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; } $out.='
'; @@ -503,7 +532,7 @@ abstract class CommonObject if ($this->skype) $out.=($outdone?'
':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); } - $out.=''; + $out.=''; return $out; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 4aea23291c2..17771a56782 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5152,7 +5152,16 @@ class Form $ret.='
'; - $ret.=dol_htmlentities($object->$fieldref); + // For thirdparty and contact, the ref is he id, so we show something else + if ($object->element == 'societe') + { + $ret.=dol_htmlentities($object->name); + } + else if (in_array($object->element, array('contact', 'user', 'member'))) + { + $ret.=dol_htmlentities($object->getFullName($langs)); + } + else $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) { $ret.=' '.$morehtmlref; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index d7fbaedfeba..565078a9d3b 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -706,7 +706,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') $contactstatic->web = $obj->web; $contactstatic->skype = $obj->skype; - $country_code = getCountry($obj->country_id, 'all'); + $country_code = getCountry($obj->country_id, 2); $contactstatic->country_code = $country_code; print ""; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 2f49b37f716..aa804cf1255 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1516,7 +1516,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio * @param int $donotdeletefile 1=Do not delete physically file * @return void */ -function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=0) +function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=1) { global $db,$user,$conf,$langs,$_FILES; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7f4a1b8d855..4a39269c23e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -840,6 +840,58 @@ function dol_get_fiche_end($notab=0) else return ''; } +/** + * Show tab footer of a card + * + * @param object $object Object to show + * @param string $paramid Name of parameter to use to name the id into the URL link + * @param string $morehtml More html content to output just before the nav bar + * @param int $shownav Show Condition (navigation is shown if value is 1) + * @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field) + * @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous + * @param string $morehtmlref More html to show after ref + * @param string $moreparam More param to add in nav link url. + * @param int $nodbprefix Do not include DB prefix to forge table name + * @param string $morehtmlleft More html code to show before ref + * @param string $morehtmlright More html code to show before navigation arrows + * @return void + */ +function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='') +{ + global $conf, $form, $user, $langs; + + //$showlogo=$object->logo; + $showlogo=1; + $showbarcode=empty($conf->barcode->enabled)?0:($object->barcode?1:0); + if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; + $modulepart='societe'; + if ($object->element == 'contact') $modulepart='contact'; + if ($object->element == 'member') $modulepart='memberphoto'; + if ($object->element == 'user') $modulepart='userphoto'; + + print '
'; + if ($showlogo) $morehtmlleft.='
'.$form->showphoto($modulepart,$object,0,0,0,'photoref').'
'; + if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; + if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { + $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); + } else { + $morehtmlright.=$object->getLibStatut(2); + } + if (! empty($object->name_nalias)) $morehtmlref.='
'.$object->name_alias.'
'; + $morehtmlref.='
'; + $morehtmlref.=$object->getBannerAddress('refaddress',$object); + $morehtmlref.='
'; + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member'))) + { + $morehtmlref.='
'; + $morehtmlref.=$langs->trans("TechnicalID").': '.$object->id; + $morehtmlref.='
'; + } + print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); + print '
'; + print '
'; +} + /** * Show a string with the label tag dedicated to the HTML edit field. * @@ -924,8 +976,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='') else // Other: title firstname name \n address lines \n zip town \n country { - $ret .= ($ret ? $sep : '' ).$object->zip; - $ret .= ($object->town?(($object->zip?' ':'').$object->town):''); + $ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : ''; + $ret .= ($object->town?(($object->zip?' ':$sep).$object->town):''); if ($object->state && in_array($object->country_code,$countriesusingstate)) { $ret.=($ret?", ":'').$object->state; @@ -1440,12 +1492,13 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64) * @param string $country Country code to use for formatting * @param int $cid Id of contact if known * @param int $socid Id of third party if known - * @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set) + * @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set) * @param string $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx * @param string $withpicto Show picto + * @param string $titlealt Text to show on alt * @return string Formated phone number */ -function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='') +function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='') { global $conf,$user,$langs,$mysoc; @@ -1525,7 +1578,11 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" } } - return '
'.($withpicto?img_picto(($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")), 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'
'; + if (empty($titlealt)) + { + $titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")); + } + return '
'.($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'
'; } /** @@ -1621,6 +1678,8 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0) { $out.=nl2br($address); $showgmap=$showomap=0; + + // TODO Add a hook here if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1; if ($mode=='contact' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) $showgmap=1; if ($mode=='member' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) $showgmap=1; @@ -1628,7 +1687,6 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0) if ($mode=='contact' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) $showomap=1; if ($mode=='member' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) $showomap=1; - // TODO Add a hook here if ($showgmap) { $url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 10b97265a93..23e122b89f6 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -462,7 +462,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '   ('.$langs->trans("Default").': 6e7896, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print ''; } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 938a615ea77..64c49894de1 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -114,12 +114,12 @@ else { } // Free line - echo ''; + echo ''; // Show radio free line if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled))) { echo '
'; + dol_fiche_end(); } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index aad1a8aae48..a603f52e226 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1447,6 +1447,14 @@ else print ''; + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Name print ''; print ''; @@ -1863,31 +1871,15 @@ else dol_htmloutput_errors($error,$errors); - //$showlogo=$object->logo; - $showlogo=1; - $showbarcode=empty($conf->barcode->enabled)?0:1; - if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0; - - print '
'; - //$morehtmlleft='
'.img_picto('', 'title_companies', '', '').'
'; - if ($showlogo) $morehtmlleft.='
'.$form->showphoto('societe',$object,0,0,0,'photoref').'
'; - //if ($showlogo) $morehtmlleft.='
'.$form->showphoto('societe',$object,0,0,0,'photoref').'
'; - if ($showbarcode) $morehtmlleft.='
'.$form->showbarcode($object).'
'; - if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { - $morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); - } else { - $morehtmlright.=$object->getLibStatut(2); - } - $morehtml=''; - if (! empty($object->ame_nalias)) $morehtml.='
'.$object->name_alias.'
'; - $morehtml.='
'; - $morehtml.=$object->getBannerAddress('refaddress',$object); - $morehtml.='
'; - print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom', $morehtml, '', 0, $morehtmlleft, $morehtmlright); - print '
'; - print '
'; - print '
'.$langs->trans("ID").''; + print $object->ref; + print '
'.fieldLabel('ThirdPartyName','name',1).'
'; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + + print '
'; + print '
'; + + print '
'; + print '
'; // Ref /* @@ -2156,7 +2148,7 @@ else } elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") { - print ''; if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1))) @@ -2178,7 +2170,7 @@ else } elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") { - print ''; if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2))) @@ -2222,6 +2214,14 @@ else else print ' '; print ''; + print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; + print '
'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).''; print yn($object->localtax1_assuj); print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print '
'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; print yn($object->localtax2_assuj); print '
'; + + print ''; + print '
'; + + print '
'; + print ''; + // Default language if (! empty($conf->global->MAIN_MULTILANGS)) { @@ -2333,7 +2333,7 @@ else if (! empty($conf->adherent->enabled)) { $langs->load("members"); - print ''; + print ''; print '
'.$langs->trans("LinkedToDolibarrMember").'
'.$langs->trans("LinkedToDolibarrMember").''; $adh=new Adherent($db); $result=$adh->fetch('','',$object->id); @@ -2357,7 +2357,11 @@ else } print '
'; - + print '
'; + + print '
'; + print '
'; + dol_fiche_end(); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 98713d0a77a..638c758ddc2 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -489,6 +489,7 @@ div.confirmmessage { .maxwidth100 { max-width: 100px; } .maxwidth200 { max-width: 200px; } .maxwidth300 { max-width: 300px; } +.titlefield { width: 25%; } .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } @@ -496,6 +497,7 @@ div.confirmmessage { .maxwidth100onsmartphone { max-width: 100px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } +.titlefield { width: auto; } .linkobject { cursor: pointer; } @@ -618,12 +620,12 @@ div.heightref { min-height: 80px; } div.divphotoref { - padding-right: 10px; + padding-right: 20px; } div.statusref { float: right; padding-right: 12px; - margin-top: 9px; + margin-top: 7px; margin-bottom: 10px; } img.photoref { @@ -637,9 +639,12 @@ img.photoref { object-fit: contain } .underrefbanner { +} +.underbanner { border-bottom: 2px solid #888; } + /* ============================================================================== */ /* Menu top et 1ere ligne tableau */ /* ============================================================================== */ @@ -1528,10 +1533,10 @@ div.tabsElem { div.tabBar { color: #; - padding-top: px; - padding-left: px; - padding-right: px; - padding-bottom: px; + padding-top: px; + padding-left: px; + padding-right: px; + padding-bottom: px; margin: 0px 0px 14px 0px; -moz-border-radius:4px; -webkit-border-radius: 4px; @@ -2064,10 +2069,9 @@ table.listwithfilterbefore { /* Pagination */ div.refidpadding { - /* padding-top: dol_use_jmobile)?'8':'12'; ?>px; */ + padding-top: dol_use_jmobile)?'3':'14'; ?>px; } div.refid { - /* padding-top: dol_use_jmobile)?'5':'12'; ?>px; */ font-weight: bold; color: #766; font-size: 160%; @@ -2130,11 +2134,15 @@ div.pagination li.pagination span.inactive { cursor: default; } div.pagination li.litext a { -border: none; + border: none; padding-right: 10px; padding-left: 4px; font-weight: bold; } +div.pagination li.litext a:hover { + background-color: transparent; + background-image: none; +} dol_use_jmobile)) { ?> div.pagination li.litext { padding-top: 13px; @@ -2517,7 +2525,10 @@ tr.box_pair td, tr.box_impair td { position: relative; } - +.prod_entry_mode_free, .prod_entry_mode_predef { + height: 26px !important; + vertical-align: middle; +} diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9fb050b0ef7..81b15ae7ec5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -493,6 +493,7 @@ div.confirmmessage { .maxwidth100 { max-width: 100px; } .maxwidth200 { max-width: 200px; } .maxwidth300 { max-width: 300px; } +.titlefield { width: 25%; } .hideonsmartphone { display: none; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } @@ -500,6 +501,7 @@ div.confirmmessage { .maxwidth100onsmartphone { max-width: 100px; } .maxwidth200onsmartphone { max-width: 200px; } .maxwidth300onsmartphone { max-width: 300px; } +.titlefield { width: auto; } .linkobject { cursor: pointer; } @@ -668,17 +670,17 @@ div.heightref { min-height: 74px; } div.divphotoref { - padding-right: 10px; + padding-right: 20px; } div.statusref { float: right; padding-right: 12px; - margin-top: 9px; + margin-top: 7px; margin-bottom: 10px; } img.photoref { - height: 68px; - width: 68px; + height: 80px; + width: 80px; border: 1px solid #CCC; -moz-box-shadow: 3px 3px 4px #DDD; -webkit-box-shadow: 3px 3px 4px #DDD; @@ -1513,10 +1515,10 @@ div.tabsElem { margin-top: 8px; } /* To avoid overlap of tabs when not browser div.tabBar { color: #; - padding-top: 9px; - padding-left: px; - padding-right: px; - padding-bottom: 8px; + padding-top: px; + padding-left: px; + padding-right: px; + padding-bottom: px; margin: 0px 0px 14px 0px; -moz-border-radius:3px; -webkit-border-radius: 3px; @@ -1934,10 +1936,9 @@ table.listwithfilterbefore { /* Pagination */ div.refidpadding { - /* padding-top: dol_use_jmobile)?'8':'12'; ?>px; */ + padding-top: dol_use_jmobile)?'3':'14'; ?>px; } div.refid { - /* padding-top: dol_use_jmobile)?'5':'12'; ?>px; */ font-weight: bold; color: #766; font-size: 160%; @@ -2382,6 +2383,10 @@ tr.box_pair td, tr.box_impair td { position: relative; } +.prod_entry_mode_free, .prod_entry_mode_predef { + height: 26px !important; + vertical-align: middle; +} diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index cd38d7a2965..ea8c1978677 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -49,8 +49,8 @@ $colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5') // Security check $id = GETPOST('id','int'); -$fuser = new User($db); -$fuser->fetch($id); +$object = new User($db); +$object->fetch($id); // Security check $socid=0; @@ -63,7 +63,7 @@ if ($user->id == $id) // A user can always read its own card $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // If user is not user that read and no permission to read other users, we stop -if (($fuser->id != $user->id) && (! $user->rights->user->user->lire)) +if (($object->id != $user->id) && (! $user->rights->user->user->lire)) accessforbidden(); @@ -108,7 +108,7 @@ if ($actionsave) if (! $error) { - $result=dol_set_user_param($db, $conf, $fuser, $tabparam); + $result=dol_set_user_param($db, $conf, $object, $tabparam); if (! $result > 0) $error++; } @@ -141,10 +141,16 @@ llxHeader('',$langs->trans("UserSetup"),'','',0,0,$arrayofjs,$arrayofcss); print '
'; print ''; -$head=user_prepare_head($fuser); +$head=user_prepare_head($object); dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user'); +dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + +print '
'; + +print '
'; + print $langs->trans("AgendaExtSitesDesc")."
\n"; print "
\n"; @@ -177,15 +183,15 @@ while ($i <= $MAXAGENDA) // Nb print ''.$langs->trans("AgendaExtNb",$key).""; // Name - print ''; + print ''; // URL - print ''; + print ''; // Offset TZ - print ''; + print ''; // Color (Possible colors are limited by Google) print ''; //print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); - print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key)?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key):$fuser->conf->$color), "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); + print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key)?GETPOST("AGENDA_EXT_COLOR_".$id.'_'.$key):$object->conf->$color), "AGENDA_EXT_COLOR_".$id.'_'.$key, 'extsitesconfig', 1, '', 'hideifnotset'); print ''; print ""; $i++; @@ -193,6 +199,7 @@ while ($i <= $MAXAGENDA) print ''; + dol_fiche_end(); print '
'; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 9744aebfbbe..41f2504f1c0 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1198,65 +1198,24 @@ else { dol_fiche_head($head, 'user', $title, 0, 'user'); - $rowspan=19; - - print ''; - - // Ref - print ''; - print ''; - print ''."\n"; - - if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++; - if (! empty($conf->societe->enabled)) $rowspan++; - if (! empty($conf->adherent->enabled)) $rowspan++; - if (! empty($conf->skype->enabled)) $rowspan++; - if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) $rowspan = $rowspan+3; - if (! empty($conf->agenda->enabled)) $rowspan++; - - // Lastname - print ''; - print ''; - - // Photo - print ''; - - print ''."\n"; - - // Firstname - print ''; - print ''; - print ''."\n"; - - // Employee - print ''."\n"; - - // Position/Job - print ''; - print ''; - print ''."\n"; - - // Gender - print ''; - print ''; + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + + print '
'; + print '
'; + + print '
'; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); - print '
'.$langs->trans("Lastname").''.$object->lastname.''; - print $form->showphoto('userphoto',$object,100); - print '
'.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("Employee").''; - print yn($object->employee); - print '
'.$langs->trans("PostOrFunction").''.$object->job.'
'.$langs->trans("Gender").''; - if ($object->gender) print $langs->trans("Gender".$object->gender); - print '
'; // Login print ''; if (! empty($object->ldap_sid) && $object->statut==0) { - print ''; + print ''; } else { - print ''; + print ''; } print ''."\n"; @@ -1266,24 +1225,24 @@ else { if ($passDoNotExpire) { - print ''; + print ''; } else if($userChangePassNextLogon) { - print ''; + print ''; } else if($userDisabled) { - print ''; + print ''; } else { - print ''; + print ''; } } else { - print ''."\n"; + // Employee + print ''."\n"; + + // Position/Job + print ''; + print ''; + print ''."\n"; + + // Gender + print ''; + print ''; + // API key if(! empty($conf->api->enabled) && $user->admin) { print ''; - print ''; } // Administrator - print ''."\n"; } - // Tel pro - print ''; - print ''; - print ''."\n"; - - // Tel mobile - print ''; - print ''; - print ''."\n"; - - // Fax - print ''; - print ''; - print ''."\n"; - // Skype if (! empty($conf->skype->enabled)) { print ''; - print ''; + print ''; print "\n"; } - // EMail - print ''; - print ''; - print "\n"; - // Signature - print '\n"; // Hierarchy print ''; - print ''; - print ''; print "\n"; @@ -1402,14 +1357,14 @@ else $text=$langs->trans("TJM"); print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); print ''; - print ''; print "\n"; // Salary print ''; - print ''; print "\n"; @@ -1417,7 +1372,7 @@ else // Weeklyhours print ''; - print ''; print "\n"; @@ -1426,38 +1381,39 @@ else if ($conf->salaries->enabled) { print ''; - print ''; + print ''; } // Color user if (! empty($conf->agenda->enabled)) { print ''; - print ''; print "\n"; } - // Status - print ''; - print ''; - print ''."\n"; - - print ''; - print ''; + print '
'.$langs->trans("Login").''.$langs->trans("LoginAccountDisableInDolibarr").''.$langs->trans("LoginAccountDisableInDolibarr").''.$object->login.''.$object->login.'
'.$langs->trans("LdapUacf_".$statutUACF).''.$langs->trans("LdapUacf_".$statutUACF).''.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).''.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).''.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).''.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).''.$langs->trans("DomainPassword").''.$langs->trans("DomainPassword").''; + print ''; if ($object->pass) print preg_replace('/./i','*',$object->pass); else { @@ -1294,17 +1253,33 @@ else } print '
'.$langs->trans("Employee").''; + print yn($object->employee); + print '
'.$langs->trans("PostOrFunction").''.$object->job.'
'.$langs->trans("Gender").''; + if ($object->gender) print $langs->trans("Gender".$object->gender); + print '
'.$langs->trans("ApiKey").''; + print ''; if (! empty($object->api_key)) print $langs->trans("Hidden"); - print ''; + print '
'.$langs->trans("Administrator").''; + print '
'.$langs->trans("Administrator").''; if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity) { print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); @@ -1323,7 +1298,7 @@ else print '
'; $text=$langs->trans("Type"); print $form->textwithpicto($text, $langs->trans("InternalExternalDesc")); - print ''; + print ''; $type=$langs->trans("Internal"); if ($object->societe_id > 0) $type=$langs->trans("External"); print $type; @@ -1333,47 +1308,27 @@ else // Ldap sid if ($object->ldap_sid) { - print '
'.$langs->trans("Type").''; + print '
'.$langs->trans("Type").''; print $langs->trans("DomainUser",$ldap->domainFQDN); print '
'.$langs->trans("PhonePro").''.dol_print_phone($object->office_phone,'',0,0,1).'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->user_mobile,'',0,0,1).'
'.$langs->trans("Fax").''.dol_print_phone($object->office_fax,'',0,0,1).'
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,0,1).''.dol_print_skype($object->skype,0,0,1).'
'.$langs->trans("EMail").''.dol_print_email($object->email,0,0,1).'
'.$langs->trans('Signature').''; + print '
'.$langs->trans('Signature').''; print dol_htmlentitiesbr($object->signature); print "
'.$langs->trans("HierarchicalResponsible").''; + print ''; if (empty($object->fk_user)) print $langs->trans("None"); else { $huser=new User($db); @@ -1392,7 +1347,7 @@ else $text=$langs->trans("THM"); print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print ''; + print ''; print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):''); print '
'; + print ''; print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):''); print '
'.$langs->trans("Salary").''; + print ''; print ($object->salary!=''?price($object->salary,'',$langs,1,-1,-1,$conf->currency):''); print '
'.$langs->trans("WeeklyHours").''; + print ''; print price2num($object->weeklyhours); print '
'.$langs->trans("AccountancyCode").''.$object->accountancy_code.''.$object->accountancy_code.'
'.$langs->trans("ColorUser").''; + print ''; print $formother->showColor($object->color, ''); print '
'.$langs->trans("Status").''; - print $object->getLibStatut(4); - print '
'.$langs->trans("LastConnexion").''.dol_print_date($object->datelastlogin,"dayhour").'
'; + + print '
'; + print '
'; + + print '
'; + print ''; + + print ''; + print ''; print "\n"; print ''; - print ''; + print ''; print "\n"; if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) { print ''; - print ''; + print ''; print "\n"; } @@ -1465,7 +1421,7 @@ else if (! empty($conf->societe->enabled)) { print ''; - print ''; - print '
'.$langs->trans("LastConnexion").''.dol_print_date($object->datelastlogin,"dayhour").'
'.$langs->trans("PreviousConnexion").''.dol_print_date($object->datepreviouslogin,"dayhour").''.dol_print_date($object->datepreviouslogin,"dayhour").'
'.$langs->trans("OpenIDURL").''.$object->openid.''.$object->openid.'
'.$langs->trans("LinkToCompanyContact").''; + print ''; if (isset($object->societe_id) && $object->societe_id > 0) { $societe = new Societe($db); @@ -1493,7 +1449,7 @@ else { $langs->load("members"); print '
'.$langs->trans("LinkedToDolibarrMember").''; + print ''; if ($object->fk_member) { $adh=new Adherent($db); @@ -1515,7 +1471,7 @@ else { if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) { - print '
'.$langs->trans("Entity").''; + print '
'.$langs->trans("Entity").''; if (empty($object->entity)) { print $langs->trans("AllEntities"); @@ -1530,7 +1486,7 @@ else } // Other attributes - $parameters=array('colspan' => ' colspan="2"'); + $parameters=array(); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { @@ -1538,6 +1494,11 @@ else } print "
\n"; + print '
'; + + print '
'; + print '
'; + dol_fiche_end(); @@ -1774,12 +1735,16 @@ else print ''; - print ''; - print ''; - print ''; - + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + print ''; + print ''; + } + // Lastname print ""; print ''; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 7aaaebbac3e..10e61f24129 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -73,49 +73,24 @@ llxHeader("","ClickToDial"); if ($id > 0) { - $fuser = new User($db); - $fuser->fetch($id); - $fuser->fetch_clicktodial(); + $object = new User($db); + $object->fetch($id); + $object->fetch_clicktodial(); - /* - * Affichage onglets - */ - $head = user_prepare_head($fuser); + $head = user_prepare_head($object); $title = $langs->trans("User"); dol_fiche_head($head, 'clicktodial', $title, 0, 'user'); - /* - * Fiche en mode visu - */ - - print '
'.$langs->trans("Ref").''; - print $object->id; - print '
'.$langs->trans("Ref").''; + print $object->id; + print '
'.$langs->trans("Lastname").'
'; - - // Ref - print ''; - print ''; - print ''; - - // Name - print ''; - print ''; - print "\n"; - - // Firstname - print ''; - print ''; - print "\n"; - - print "
'.$langs->trans("Ref").''; - print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin); - print '
'.$langs->trans("Lastname").''.$fuser->lastname.'
'.$langs->trans("Firstname").''.$fuser->firstname.'
\n"; - print "
\n"; - - // Edit mode + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + print '
'; + + // Edit mode if ($action == 'edit') { - print ''; + print ''; print ''; print ''; print ''; @@ -124,8 +99,8 @@ if ($id > 0) { print ''; print ''; } - print ''; + print ''; print ''; + print ''; print "\n"; - print ''; + print ''; print ''; + print ''; print ''; - print ''; + print ''; print ''; + print ''; print "\n"; print '
ClickToDial URL'; - print ''; - if (empty($conf->global->CLICKTODIAL_URL) && empty($fuser->clicktodial_url)) + print ''; + if (empty($conf->global->CLICKTODIAL_URL) && empty($object->clicktodial_url)) { $langs->load("errors"); print ''.$langs->trans("ErrorModuleSetupNotComplete").''; @@ -138,19 +113,19 @@ if ($id > 0) print '
ClickToDial '.$langs->trans("IdPhoneCaller").'
ClickToDial '.$langs->trans("IdPhoneCaller").''; - print '
ClickToDial '.$langs->trans("Login").'
ClickToDial '.$langs->trans("Login").''; - print '
ClickToDial '.$langs->trans("Password").'
ClickToDial '.$langs->trans("Password").''; - print '
'; @@ -169,10 +144,10 @@ if ($id > 0) if (! empty($user->admin)) { - print "".'ClickToDial URL'; + print 'ClickToDial URL'; print ''; $url=$conf->global->CLICKTODIAL_URL; - if (! empty($fuser->clicktodial_url)) $url=$fuser->clicktodial_url; + if (! empty($object->clicktodial_url)) $url=$object->clicktodial_url; if (empty($url)) { $langs->load("errors"); @@ -180,28 +155,29 @@ if ($id > 0) } else { - print $form->textwithpicto((empty($fuser->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc")); + print $form->textwithpicto((empty($object->clicktodial_url)?$langs->trans("DefaultLink").': ':'').$url,$langs->trans("ClickToDialUrlDesc")); } print ''; print ''; } - print 'ClickToDial '.$langs->trans("IdPhoneCaller").''; - print ''.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').''; + print 'ClickToDial '.$langs->trans("IdPhoneCaller").''; + print ''.(! empty($object->clicktodial_poste)?$object->clicktodial_poste:'').''; print ""; - print 'ClickToDial '.$langs->trans("Login").''; - print ''.(! empty($fuser->clicktodial_login)?$fuser->clicktodial_login:'').''; + print 'ClickToDial '.$langs->trans("Login").''; + print ''.(! empty($object->clicktodial_login)?$object->clicktodial_login:'').''; print ''; - print 'ClickToDial '.$langs->trans("Password").''; - print ''.preg_replace('/./','*',(! empty($fuser->clicktodial_password)?$fuser->clicktodial_password:'')).''; + print 'ClickToDial '.$langs->trans("Password").''; + print ''.preg_replace('/./','*',(! empty($object->clicktodial_password)?$object->clicktodial_password:'')).''; print "\n"; print "\n"; } - print "\n"; + dol_fiche_end(); + /* * Barre d'actions @@ -210,11 +186,10 @@ if ($id > 0) if (! empty($user->admin) && $action <> 'edit') { - print ''.$langs->trans("Modify").''; + print ''.$langs->trans("Modify").''; } print "\n"; - print "
\n"; } diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 25dea7eb398..46ceb72330c 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Cédric Salvador @@ -121,7 +121,10 @@ if ($object->id) dol_fiche_head($head, 'document', $langs->trans("User"),0,'user'); - + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + print '
'; + // Construit liste des fichiers $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; @@ -133,20 +136,6 @@ if ($object->id) print ''; - // Reference - print ''; - print ''; - print ''; - - // Lastname - print ''; - print ''; - - // Firstname - print ''; - // Login print ''; diff --git a/htdocs/user/info.php b/htdocs/user/info.php index e2fdcc7b6ec..f069ac4782b 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -54,6 +54,8 @@ if (($object->id != $user->id) && (! $user->rights->user->user->lire)) * View */ +$form = new Form($db); + llxHeader(); $object->info($id); @@ -64,12 +66,24 @@ $title = $langs->trans("User"); dol_fiche_head($head, 'info', $title, 0, 'user'); -print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); - print '
'.$langs->trans("Lastname").''.$object->lastname.' 
'.$langs->trans("Firstname").''.$object->firstname.' 
'.$langs->trans("Login").''.$object->login.' 
'; +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + +print '
'; + +print '
'; + +print '
'; + dol_print_object_info($object); -print '
'; print ''; -$db->close(); + +dol_fiche_end(); + llxFooter(); +$db->close(); diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 0ee41812c29..3445ab44959 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -89,27 +89,14 @@ $head = user_prepare_head($object); $title = $langs->trans("User"); dol_fiche_head($head, 'ldap', $title, 0, 'user'); +dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + +print '
'; + print ''; -// Ref -print ''; -print ''; -print ''; - -// Lastname -print ''; -print ''; -print "\n"; - -// Firstname -print ''; -print ''; -print "\n"; - // Login -print ''; +print ''; if ($object->ldap_sid) { print ''; diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 7fe5766cd3a..3aec8502ac1 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -87,33 +87,21 @@ if ($id) $title = $langs->trans("User"); dol_fiche_head($head, 'note', $title, 0, 'user'); - if ($msg) print '
'.$msg.'
'; - - print ""; + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + print '
'; + + print ""; print ''; print '
'.$langs->trans("Ref").''; -print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); -print '
'.$langs->trans("Lastname").''.$object->lastname.'
'.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("Login").'
'.$langs->trans("Login").''.$langs->trans("LoginAccountDisableInDolibarr").'
'; - // Reference - print ''; - print ''; - print ''; - - // Lastname - print ''; - print ''; - - // Firstname - print ''; - // Login - print ''; + print ''; // Note print ''; - print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); - print '
'.$langs->trans("Lastname").''.$object->lastname.' 
'.$langs->trans("Firstname").''.$object->firstname.' 
'.$langs->trans("Login").''.$object->login.' 
'.$langs->trans("Login").''.$object->login.' 
'.$langs->trans("Note").''; + print ''; if ($action == 'edit' && $user->rights->user->user->creer) { print ""; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 9e67a1015c7..ef803992d00 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -136,33 +136,18 @@ if ($action == 'edit') } -dol_fiche_head($head, 'guisetup', $title, 0, 'user'); - - -print ''; - -// Ref -print ''; -print ''; -print ''; - -// LastName -print ''; -print ''; -print "\n"; - -// FirstName -print ''; -print ''; -print "\n"; - -print '
'.$langs->trans("Ref").''; -print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin); -print '
'.$langs->trans("LastName").''.$object->lastname.'
'.$langs->trans("FirstName").''.$object->firstname.'

'; - - if ($action == 'edit') { + dol_fiche_head($head, 'guisetup', $title, 0, 'user'); + + dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin); + + + print '
'; + + print '
'; + + if (! empty($conf->use_javascript_ajax)) {/* print '