Merge remote-tracking branch 'Upstream/develop' into develop-hrm

This commit is contained in:
aspangaro 2015-10-11 21:05:15 +02:00
commit 0b54cc4509
32 changed files with 509 additions and 446 deletions

View File

@ -13,7 +13,8 @@ make a Dolibarr upgrade.
WARNING: Following changes may create regression for some external modules, but were necessary to make WARNING: Following changes may create regression for some external modules, but were necessary to make
Dolibarr better: 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.* ***** ***** ChangeLog for 3.8 compared to 3.7.* *****

View File

@ -73,5 +73,9 @@ else
dol_print_error($db,'Error'); dol_print_error($db,'Error');
$found = '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);

View File

@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref))
if ($sep > 0) print ' '; // If we had at least one line in future if ($sep > 0) print ' '; // If we had at least one line in future
else print $langs->trans("CurrentBalance"); else print $langs->trans("CurrentBalance");
print ' '.$object->currency_code.'</td>'; print ' '.$object->currency_code.'</td>';
print '<td align="right" class="nowrap"><b>'.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>'; print '<td align="right" class="nowrap"><b>'.price($total, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
} else { } else {

View File

@ -773,10 +773,13 @@ else
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref/ID
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="3">'; if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
{
print '<tr><td>'.$langs->trans("ID").'</td><td colspan="3">';
print $object->ref; print $object->ref;
print '</td></tr>'; print '</td></tr>';
}
// Lastname // Lastname
print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>'; print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
@ -1040,23 +1043,32 @@ else
} }
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Ref // Ref
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">'; /*print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
print $form->showrefnav($object, 'id', $linkback); print $form->showrefnav($object, 'id', $linkback);
print '</td></tr>'; print '</td></tr>';
// Name // Name
print '<tr><td width="20%">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%">'.$object->lastname.'</td>'; print '<tr><td width="20%">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%">'.$object->lastname.'</td>';
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%">'.$object->firstname.'</td>'; print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%">'.$object->firstname.'</td>';
*/
// Company // Company
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
{ {
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
if ($object->socid > 0) if ($object->socid > 0)
{ {
$objsoc->fetch($object->socid); $objsoc->fetch($object->socid);
@ -1070,6 +1082,7 @@ else
} }
// Photo // Photo
/*
if ($object->photo) if ($object->photo)
{ {
print '<td rowspan="6" style="text-align: center;" width="25%">'; print '<td rowspan="6" style="text-align: center;" width="25%">';
@ -1080,18 +1093,20 @@ else
print '&nbsp;'; print '&nbsp;';
print '</td>'; print '</td>';
} }
*/
print '</tr>'; print '</tr>';
// Civility // Civility
print '<tr><td width="15%">'.$langs->trans("UserTitle").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
print $object->getCivilityLabel(); print $object->getCivilityLabel();
print '</td></tr>'; print '</td></tr>';
// Role // Role
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="2">'.$object->poste.'</td>'; print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td>'.$object->poste.'</td></tr>';
// Address // Address
/*
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("Address").'</td><td colspan="2">';
dol_print_address($object->address,'gmap','contact',$object->id); dol_print_address($object->address,'gmap','contact',$object->id);
print '</td></tr>'; print '</td></tr>';
@ -1112,67 +1127,71 @@ else
// State // State
if (empty($conf->global->SOCIETE_DISABLE_STATE)) if (empty($conf->global->SOCIETE_DISABLE_STATE))
{ {
print '<tr><td>'.$langs->trans('State').'</td><td colspan="2">'.$object->state.'</td>'; print '<tr><td>'.$langs->trans('State').'</td><td>'.$object->state.'</td></tr>';
} }*/
// Phone // Phone
/*
print '<tr><td>'.$langs->trans("PhonePro").'</td><td>'.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td>'; print '<tr><td>'.$langs->trans("PhonePro").'</td><td>'.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td>';
print '<td>'.$langs->trans("PhonePerso").'</td><td>'.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td></tr>'; print '<td>'.$langs->trans("PhonePerso").'</td><td>'.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td></tr>';
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td>'.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td>'; print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td>'.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td>';
print '<td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'</td></tr>'; print '<td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'</td></tr>';
*/
// Email // Email
print '<tr><td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'</td>'; //print '<tr><td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'</td></tr>';
if (! empty($conf->mailing->enabled)) if (! empty($conf->mailing->enabled))
{ {
$langs->load("mails"); $langs->load("mails");
print '<td class="nowrap">'.$langs->trans("NbOfEMailingsSend").'</td>'; print '<tr><td class="nowrap">'.$langs->trans("NbOfEMailingsSend").'</td>';
print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td>'; print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td></tr>';
} }
else
{
print '<td colspan="2">&nbsp;</td>';
}
print '</tr>';
// Instant message and no email // Instant message and no email
print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td>'; print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td></tr>';
if (!empty($conf->mailing->enabled)) if (!empty($conf->mailing->enabled))
{ {
print '<td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td>'; print '<tr><td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td></tr>';
} }
else
{
print '<td colspan="2">&nbsp;</td>';
}
print '</tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->skype->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>'; print '<tr><td>'.$langs->trans("Skype").'</td><td>'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
} }
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">'; print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td>';
print $object->LibPubPriv($object->priv); print $object->LibPubPriv($object->priv);
print '</td></tr>'; print '</td></tr>';
// Note Public // Note Public
print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td><td colspan="3">'; /*
print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td><td>';
print nl2br($object->note_public); print nl2br($object->note_public);
print '</td></tr>'; print '</td></tr>';
// Note Private // Note Private
print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td><td colspan="3">'; print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td><td>';
print nl2br($object->note_private); print nl2br($object->note_private);
print '</td></tr>';
*/
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Statut // Statut
print '<tr><td>'.$langs->trans("Status").'</td>'; /*print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td>'; print '<td>';
print $object->getLibStatut(4); print $object->getLibStatut(4);
print '</td>'; print '</td>';
print '</tr>'."\n"; print '</tr>'."\n";
*/
// Categories // Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
@ -1241,6 +1260,9 @@ else
print "</table>"; print "</table>";
print '</div></div></div>';
print '<div style="clear:both"></div>';
print dol_fiche_end(); print dol_fiche_end();
// Barre d'actions // Barre d'actions

View File

@ -32,35 +32,49 @@ $langs->load("companies");
// Security check // Security check
$contactid = GETPOST("id",'int'); $id = GETPOST("id",'int');
if ($user->societe_id) $socid=$user->societe_id; 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 * View
*/ */
$form=new Form($db);
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;dulo_Empresas'); llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:M&oacute;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'); dol_fiche_head($head, 'info', $title, 0, 'contact');
// TODO Put here ref of card $linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
dol_print_object_info($contact); dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<br>';
dol_print_object_info($object);
print '</div>';
dol_fiche_end(); dol_fiche_end();
} }

View File

@ -1332,7 +1332,7 @@ class Contrat extends CommonObject
if (empty($error)) { if (empty($error)) {
// Call trigger // Call trigger
$result=$this->call_trigger('LINECONTRACT_CREATE',$user); $result=$this->call_trigger('LINECONTRACT_INSERT',$user);
if ($result < 0) if ($result < 0)
{ {
$this->db->rollback(); $this->db->rollback();
@ -2644,7 +2644,7 @@ class ContratLigne extends CommonObjectLine
if (!$notrigger) if (!$notrigger)
{ {
// Call trigger // Call trigger
$result = $this->call_trigger('LINECONTRACT_CREATE', $user); $result = $this->call_trigger('LINECONTRACT_INSERT', $user);
if ($result < 0) { if ($result < 0) {
$this->db->rollback(); $this->db->rollback();
return -1; return -1;

View File

@ -56,7 +56,7 @@ if (! empty($_POST['removedfile']) && empty($_POST['removAll']))
$upload_dir_tmp = $vardir.'/temp'; $upload_dir_tmp = $vardir.'/temp';
// TODO Delete only files that was uploaded from email form // 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'; $action='presend';
} }

View File

@ -437,21 +437,39 @@ abstract class CommonObject
/** /**
* Return full address of contact * 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 * @return string Full address string
*/ */
function getBannerAddress($htmlkey, $object=null) function getBannerAddress($htmlkey, $object)
{ {
global $conf, $langs; global $conf, $langs;
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); $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.='<!-- BEGIN PHP TEMPLATE address_view.tpl.php -->'; $out='<!-- BEGIN part to show address block -->';
$outdone=0; $outdone=0;
$coords = $this->getFullAddress(1,', '); $coords = $this->getFullAddress(1,', ');
if ($coords)
{
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
$namecoords = $this->getFullName($langs,1).'<br>'.$coords; $namecoords = $this->getFullName($langs,1).'<br>'.$coords;
@ -460,30 +478,41 @@ abstract class CommonObject
$out.=img_picto($langs->trans("Address"), 'object_address.png'); $out.=img_picto($langs->trans("Address"), 'object_address.png');
$out.='</a> '; $out.='</a> ';
} }
if ($coords) {
$out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++; $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++;
$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) && ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
{ {
$out.=($outdone?'<br>':'').$this->state; $out.=($outdone?'<br>':'').$this->state;
$outdone++; $outdone++;
} }
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax) $out.=($outdone?'<br>':''); if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax || $this->office_phone || $this->user_mobile || $this->office_fax) $out.=($outdone?'<br>':'');
if ($this->phone_pro) { if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
$out.=dol_print_phone($this->phone_pro,$country_code['code'],$this->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++; $out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
} }
if ($this->phone_mobile) { if (! empty($this->phone_pro)) {
$out.=dol_print_phone($this->phone_mobile,$country_code['code'],$this->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++; $out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
} }
if ($this->phone_perso) { if (! empty($this->phone_mobile)) {
$out.=dol_print_phone($this->phone_perso,$country_code['code'],$this->rowid,$object->id,'AC_TEL','&nbsp;','phone'); $outdone++; $out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++;
} }
if ($this->fax) { if (! empty($this->phone_perso)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$this->rowid,$object->id,'AC_FAX','&nbsp;','fax'); $outdone++; $out.=dol_print_phone($this->phone_perso,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePerso")); $outdone++;
}
if (! empty($this->fax)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
}
if (! empty($this->office_phone)) {
$out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
}
if (! empty($this->user_mobile)) {
$out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++;
}
if (! empty($this->office_fax)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
} }
$out.='<div style="clear: both;"></div>'; $out.='<div style="clear: both;"></div>';
@ -503,7 +532,7 @@ abstract class CommonObject
if ($this->skype) $out.=($outdone?'<br>':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); if ($this->skype) $out.=($outdone?'<br>':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
} }
$out.='<!-- END PHP TEMPLATE address_view.tpl.php -->'; $out.='<!-- END Part to show address block -->';
return $out; return $out;
} }

View File

@ -5152,7 +5152,16 @@ class Form
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">'; $ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
$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) if ($morehtmlref)
{ {
$ret.=' '.$morehtmlref; $ret.=' '.$morehtmlref;

View File

@ -706,7 +706,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
$contactstatic->web = $obj->web; $contactstatic->web = $obj->web;
$contactstatic->skype = $obj->skype; $contactstatic->skype = $obj->skype;
$country_code = getCountry($obj->country_id, 'all'); $country_code = getCountry($obj->country_id, 2);
$contactstatic->country_code = $country_code; $contactstatic->country_code = $country_code;
print "<tr ".$bc[$var].">"; print "<tr ".$bc[$var].">";

View File

@ -1516,7 +1516,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
* @param int $donotdeletefile 1=Do not delete physically file * @param int $donotdeletefile 1=Do not delete physically file
* @return void * @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; global $db,$user,$conf,$langs,$_FILES;

View File

@ -840,6 +840,58 @@ function dol_get_fiche_end($notab=0)
else return ''; 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 '<div class="arearef heightref valignmiddle" width="100%">';
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto($modulepart,$object,0,0,0,'photoref').'</div>';
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
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.='<div class="refidno">'.$object->name_alias.'</div>';
$morehtmlref.='<div class="refidno">';
$morehtmlref.=$object->getBannerAddress('refaddress',$object);
$morehtmlref.='</div>';
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member')))
{
$morehtmlref.='<div style="clear: both;"></div><div class="refidno">';
$morehtmlref.=$langs->trans("TechnicalID").': '.$object->id;
$morehtmlref.='</div>';
}
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
print '</div>';
print '<div class="underrefbanner clearboth"></div>';
}
/** /**
* Show a string with the label tag dedicated to the HTML edit field. * 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 else // Other: title firstname name \n address lines \n zip town \n country
{ {
$ret .= ($ret ? $sep : '' ).$object->zip; $ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : '';
$ret .= ($object->town?(($object->zip?' ':'').$object->town):''); $ret .= ($object->town?(($object->zip?' ':$sep).$object->town):'');
if ($object->state && in_array($object->country_code,$countriesusingstate)) if ($object->state && in_array($object->country_code,$countriesusingstate))
{ {
$ret.=($ret?", ":'').$object->state; $ret.=($ret?", ":'').$object->state;
@ -1443,9 +1495,10 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
* @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 $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx
* @param string $withpicto Show picto * @param string $withpicto Show picto
* @param string $titlealt Text to show on alt
* @return string Formated phone number * @return string Formated phone number
*/ */
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="&nbsp;",$withpicto='') function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="&nbsp;",$withpicto='',$titlealt='')
{ {
global $conf,$user,$langs,$mysoc; global $conf,$user,$langs,$mysoc;
@ -1525,7 +1578,11 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="
} }
} }
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto(($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")), 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'</div>'; if (empty($titlealt))
{
$titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone"));
}
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'</div>';
} }
/** /**
@ -1621,6 +1678,8 @@ function dol_print_address($address, $htmlid, $mode, $id, $noprint=0)
{ {
$out.=nl2br($address); $out.=nl2br($address);
$showgmap=$showomap=0; $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=='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=='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; 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=='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; if ($mode=='member' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) $showomap=1;
// TODO Add a hook here
if ($showgmap) if ($showgmap)
{ {
$url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1); $url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1);

View File

@ -462,7 +462,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; width: 36px; background-color: #'.$color.'" value="'.$color.'">'; if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; width: 36px; background-color: #'.$color.'" value="'.$color.'">';
else print $langs->trans("Default"); else print $langs->trans("Default");
} }
print ' &nbsp; ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print ' &nbsp; ('.$langs->trans("Default").': <strong>6e7896</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
print '</td>'; print '</td>';
} }

View File

@ -114,12 +114,12 @@ else {
} }
// Free line // Free line
echo '<span>'; echo '<span class="prod_entry_mode_free">';
// Show radio free line // Show radio free line
if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled))) if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
{ {
echo '<label for="prod_entry_mode_free">'; echo '<label for="prod_entry_mode_free">';
echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_free" value="free"'; echo '<input type="radio" class="prod_entry_mode_free" name="prod_entry_mode" id="prod_entry_mode_free" value="free"';
//echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ((empty($forceall) && (empty($conf->product->enabled) || empty($conf->service->enabled)))?' checked':'') ); //echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ((empty($forceall) && (empty($conf->product->enabled) || empty($conf->service->enabled)))?' checked':'') );
echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ''); echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : '');
echo '> '; echo '> ';
@ -147,9 +147,9 @@ else {
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{ {
if ($forceall >= 0) echo '<br>'; if ($forceall >= 0) echo '<br>';
echo '<span>'; echo '<span class="prod_entry_mode_predef">';
echo '<label for="prod_entry_mode_predef">'; echo '<label for="prod_entry_mode_predef">';
echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked':'').'> '; echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked':'').'> ';
if (empty($senderissupplier)) if (empty($senderissupplier))
{ {
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell'); if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell');

View File

@ -167,7 +167,7 @@ class InterfaceDemo extends DolibarrTriggers
case 'CONTRACT_CANCEL': case 'CONTRACT_CANCEL':
case 'CONTRACT_CLOSE': case 'CONTRACT_CLOSE':
case 'CONTRACT_DELETE': case 'CONTRACT_DELETE':
case 'LINECONTRACT_CREATE': case 'LINECONTRACT_INSERT':
case 'LINECONTRACT_UPDATE': case 'LINECONTRACT_UPDATE':
case 'LINECONTRACT_DELETE': case 'LINECONTRACT_DELETE':

View File

@ -1083,7 +1083,7 @@ if (empty($reshook))
$upload_dir_tmp = $vardir.'/temp'; $upload_dir_tmp = $vardir.'/temp';
// TODO Delete only files that was uploaded from email form // 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'; $action='presend';
} }

View File

@ -917,7 +917,7 @@ if (empty($reshook))
$upload_dir_tmp = $vardir.'/temp'; $upload_dir_tmp = $vardir.'/temp';
// TODO Delete only files that was uploaded from email form // 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'; $action='presend';
} }

View File

@ -218,26 +218,13 @@ if ($id > 0)
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'paidholidays', $title, 0, 'user'); dol_fiche_head($head, 'paidholidays', $title, 0, 'user');
print '<table class="border" width="100%">'; dol_banner_tab($fuser,'id','',$user->rights->user->user->lire || $user->admin);
// Ref
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="2">';
print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// LastName print '<div class="underbanner clearboth"></div>';
print '<tr><td width="25%">'.$langs->trans("LastName").'</td>';
print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n";
// FirstName print '<br>';
print '<tr><td width="25%">'.$langs->trans("FirstName").'</td>';
print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n";
print '</table><br>';
} }
else else
{ {

View File

@ -97,6 +97,7 @@ DolibarrHasDetectedError=Dolibarr has detected a technical error
InformationToHelpDiagnose=This is information that can help diagnostic InformationToHelpDiagnose=This is information that can help diagnostic
MoreInformation=More information MoreInformation=More information
TechnicalInformation=Technical information TechnicalInformation=Technical information
TechnicalID=Technical ID
NotePublic=Note (public) NotePublic=Note (public)
NotePrivate=Note (private) NotePrivate=Note (private)
PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to <b>%s</b> decimals. PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to <b>%s</b> decimals.

View File

@ -57,6 +57,8 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
* View * View
*/ */
$form=new Form($b);
$title=$langs->trans("ThirdParty"); $title=$langs->trans("ThirdParty");
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Info"); if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Info");
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
@ -82,10 +84,20 @@ if ($socid > 0)
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company');
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<br>';
print '<table width="100%"><tr><td>';
dol_print_object_info($object); dol_print_object_info($object);
print '</td></tr></table>';
print '</div>';
dol_fiche_end(); dol_fiche_end();
} }

View File

@ -1447,6 +1447,14 @@ else
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref/ID
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
{
print '<tr><td>'.$langs->trans("ID").'</td><td colspan="3">';
print $object->ref;
print '</td></tr>';
}
// Name // Name
print '<tr><td>'.fieldLabel('ThirdPartyName','name',1).'</td>'; print '<tr><td>'.fieldLabel('ThirdPartyName','name',1).'</td>';
print '<td colspan="3"><input type="text" size="60" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>'; print '<td colspan="3"><input type="text" size="60" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>';
@ -1863,31 +1871,15 @@ else
dol_htmloutput_errors($error,$errors); 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 '<div class="arearef heightref valignmiddle" width="100%">'; dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
//$morehtmlleft='<div class="floatleft inline-block valignmiddle divphotoref">'.img_picto('', 'title_companies', '', '').'</div>';
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
//if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
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.='<div class="refidno">'.$object->name_alias.'</div>';
$morehtml.='<div class="refidno">';
$morehtml.=$object->getBannerAddress('refaddress',$object);
$morehtml.='</div>';
print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom', $morehtml, '', 0, $morehtmlleft, $morehtmlright);
print '</div>';
print '<div class="underrefbanner clearboth"></div>';
print '<table class="border" width="100%">';
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Ref // Ref
/* /*
@ -2156,7 +2148,7 @@ else
} }
elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1") elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
{ {
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td colspan="3">'; print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax1_assuj); print yn($object->localtax1_assuj);
print '</td><tr>'; print '</td><tr>';
if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1))) if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
@ -2178,7 +2170,7 @@ else
} }
elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1") elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
{ {
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">'; print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td>';
print yn($object->localtax2_assuj); print yn($object->localtax2_assuj);
print '</td><tr>'; print '</td><tr>';
if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2))) if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
@ -2222,6 +2214,14 @@ else
else print '&nbsp;'; else print '&nbsp;';
print '</td></tr>'; print '</td></tr>';
print '</table>';
print '</div>';
print '<div class="fichehalfright"><div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// Default language // Default language
if (! empty($conf->global->MAIN_MULTILANGS)) if (! empty($conf->global->MAIN_MULTILANGS))
{ {
@ -2333,7 +2333,7 @@ else
if (! empty($conf->adherent->enabled)) if (! empty($conf->adherent->enabled))
{ {
$langs->load("members"); $langs->load("members");
print '<tr><td width="25%" class="tdtop">'.$langs->trans("LinkedToDolibarrMember").'</td>'; print '<tr><td class="tdtop">'.$langs->trans("LinkedToDolibarrMember").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
$adh=new Adherent($db); $adh=new Adherent($db);
$result=$adh->fetch('','',$object->id); $result=$adh->fetch('','',$object->id);
@ -2357,6 +2357,10 @@ else
} }
print '</table>'; print '</table>';
print '</div>';
print '</div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();

View File

@ -489,6 +489,7 @@ div.confirmmessage {
.maxwidth100 { max-width: 100px; } .maxwidth100 { max-width: 100px; }
.maxwidth200 { max-width: 200px; } .maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; } .maxwidth300 { max-width: 300px; }
.titlefield { width: 25%; }
<?php if (! empty($dol_optimize_smallscreen)) { ?> <?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
@ -496,6 +497,7 @@ div.confirmmessage {
.maxwidth100onsmartphone { max-width: 100px; } .maxwidth100onsmartphone { max-width: 100px; }
.maxwidth200onsmartphone { max-width: 200px; } .maxwidth200onsmartphone { max-width: 200px; }
.maxwidth300onsmartphone { max-width: 300px; } .maxwidth300onsmartphone { max-width: 300px; }
.titlefield { width: auto; }
<?php } ?> <?php } ?>
.linkobject { cursor: pointer; } .linkobject { cursor: pointer; }
<?php if (GETPOST("optioncss") == 'print') { ?> <?php if (GETPOST("optioncss") == 'print') { ?>
@ -618,12 +620,12 @@ div.heightref {
min-height: 80px; min-height: 80px;
} }
div.divphotoref { div.divphotoref {
padding-right: 10px; padding-right: 20px;
} }
div.statusref { div.statusref {
float: right; float: right;
padding-right: 12px; padding-right: 12px;
margin-top: 9px; margin-top: 7px;
margin-bottom: 10px; margin-bottom: 10px;
} }
img.photoref { img.photoref {
@ -637,9 +639,12 @@ img.photoref {
object-fit: contain object-fit: contain
} }
.underrefbanner { .underrefbanner {
}
.underbanner {
border-bottom: 2px solid #888; border-bottom: 2px solid #888;
} }
/* ============================================================================== */ /* ============================================================================== */
/* Menu top et 1ere ligne tableau */ /* Menu top et 1ere ligne tableau */
/* ============================================================================== */ /* ============================================================================== */
@ -1528,10 +1533,10 @@ div.tabsElem {
div.tabBar { div.tabBar {
color: #<?php echo $colortextbacktab; ?>; color: #<?php echo $colortextbacktab; ?>;
padding-top: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px; padding-top: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px; padding-left: <?php echo ($dol_optimize_smallscreen?'4':'18'); ?>px;
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px; padding-right: <?php echo ($dol_optimize_smallscreen?'4':'18'); ?>px;
padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'12'); ?>px; padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
margin: 0px 0px 14px 0px; margin: 0px 0px 14px 0px;
-moz-border-radius:4px; -moz-border-radius:4px;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
@ -2064,10 +2069,9 @@ table.listwithfilterbefore {
/* Pagination */ /* Pagination */
div.refidpadding { div.refidpadding {
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px; */ padding-top: <?php print empty($conf->dol_use_jmobile)?'3':'14'; ?>px;
} }
div.refid { div.refid {
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px; */
font-weight: bold; font-weight: bold;
color: #766; color: #766;
font-size: 160%; font-size: 160%;
@ -2130,11 +2134,15 @@ div.pagination li.pagination span.inactive {
cursor: default; cursor: default;
} }
div.pagination li.litext a { div.pagination li.litext a {
border: none; border: none;
padding-right: 10px; padding-right: 10px;
padding-left: 4px; padding-left: 4px;
font-weight: bold; font-weight: bold;
} }
div.pagination li.litext a:hover {
background-color: transparent;
background-image: none;
}
<?php if (! empty($conf->dol_use_jmobile)) { ?> <?php if (! empty($conf->dol_use_jmobile)) { ?>
div.pagination li.litext { div.pagination li.litext {
padding-top: 13px; padding-top: 13px;
@ -2517,7 +2525,10 @@ tr.box_pair td, tr.box_impair td {
position: relative; position: relative;
} }
.prod_entry_mode_free, .prod_entry_mode_predef {
height: 26px !important;
vertical-align: middle;
}

View File

@ -493,6 +493,7 @@ div.confirmmessage {
.maxwidth100 { max-width: 100px; } .maxwidth100 { max-width: 100px; }
.maxwidth200 { max-width: 200px; } .maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; } .maxwidth300 { max-width: 300px; }
.titlefield { width: 25%; }
<?php if (! empty($dol_optimize_smallscreen)) { ?> <?php if (! empty($dol_optimize_smallscreen)) { ?>
.hideonsmartphone { display: none; } .hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; }
@ -500,6 +501,7 @@ div.confirmmessage {
.maxwidth100onsmartphone { max-width: 100px; } .maxwidth100onsmartphone { max-width: 100px; }
.maxwidth200onsmartphone { max-width: 200px; } .maxwidth200onsmartphone { max-width: 200px; }
.maxwidth300onsmartphone { max-width: 300px; } .maxwidth300onsmartphone { max-width: 300px; }
.titlefield { width: auto; }
<?php } ?> <?php } ?>
.linkobject { cursor: pointer; } .linkobject { cursor: pointer; }
<?php if (GETPOST("optioncss") == 'print') { ?> <?php if (GETPOST("optioncss") == 'print') { ?>
@ -668,17 +670,17 @@ div.heightref {
min-height: 74px; min-height: 74px;
} }
div.divphotoref { div.divphotoref {
padding-right: 10px; padding-right: 20px;
} }
div.statusref { div.statusref {
float: right; float: right;
padding-right: 12px; padding-right: 12px;
margin-top: 9px; margin-top: 7px;
margin-bottom: 10px; margin-bottom: 10px;
} }
img.photoref { img.photoref {
height: 68px; height: 80px;
width: 68px; width: 80px;
border: 1px solid #CCC; border: 1px solid #CCC;
-moz-box-shadow: 3px 3px 4px #DDD; -moz-box-shadow: 3px 3px 4px #DDD;
-webkit-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 { div.tabBar {
color: #<?php echo $colortextbacktab; ?>; color: #<?php echo $colortextbacktab; ?>;
padding-top: 9px; padding-top: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'8'); ?>px; padding-left: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'8'); ?>px; padding-right: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
padding-bottom: 8px; padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
margin: 0px 0px 14px 0px; margin: 0px 0px 14px 0px;
-moz-border-radius:3px; -moz-border-radius:3px;
-webkit-border-radius: 3px; -webkit-border-radius: 3px;
@ -1934,10 +1936,9 @@ table.listwithfilterbefore {
/* Pagination */ /* Pagination */
div.refidpadding { div.refidpadding {
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px; */ padding-top: <?php print empty($conf->dol_use_jmobile)?'3':'14'; ?>px;
} }
div.refid { div.refid {
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px; */
font-weight: bold; font-weight: bold;
color: #766; color: #766;
font-size: 160%; font-size: 160%;
@ -2382,6 +2383,10 @@ tr.box_pair td, tr.box_impair td {
position: relative; position: relative;
} }
.prod_entry_mode_free, .prod_entry_mode_predef {
height: 26px !important;
vertical-align: middle;
}

View File

@ -49,8 +49,8 @@ $colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5')
// Security check // Security check
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$fuser = new User($db); $object = new User($db);
$fuser->fetch($id); $object->fetch($id);
// Security check // Security check
$socid=0; $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); $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 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(); accessforbidden();
@ -108,7 +108,7 @@ if ($actionsave)
if (! $error) if (! $error)
{ {
$result=dol_set_user_param($db, $conf, $fuser, $tabparam); $result=dol_set_user_param($db, $conf, $object, $tabparam);
if (! $result > 0) $error++; if (! $result > 0) $error++;
} }
@ -141,10 +141,16 @@ llxHeader('',$langs->trans("UserSetup"),'','',0,0,$arrayofjs,$arrayofcss);
print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">'; print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="id" value="'.$id.'">'; print '<input type="hidden" name="id" value="'.$id.'">';
$head=user_prepare_head($fuser); $head=user_prepare_head($object);
dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user'); dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user');
dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
print '<br>';
print $langs->trans("AgendaExtSitesDesc")."<br>\n"; print $langs->trans("AgendaExtSitesDesc")."<br>\n";
print "<br>\n"; print "<br>\n";
@ -177,15 +183,15 @@ while ($i <= $MAXAGENDA)
// Nb // Nb
print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb",$key)."</td>"; print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb",$key)."</td>";
// Name // Name
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME_'.$id.'_'.$key.'" value="'. (GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key)?GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key):$fuser->conf->$name) . '" size="28"></td>'; print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME_'.$id.'_'.$key.'" value="'. (GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key)?GETPOST('AGENDA_EXT_NAME_'.$id.'_'.$key):$object->conf->$name) . '" size="28"></td>';
// URL // URL
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC_'.$id.'_'.$key.'" value="'. (GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key)?GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key):$fuser->conf->$src) . '" size="60"></td>'; print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC_'.$id.'_'.$key.'" value="'. (GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key)?GETPOST('AGENDA_EXT_SRC_'.$id.'_'.$key):$object->conf->$src) . '" size="60"></td>';
// Offset TZ // Offset TZ
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key.'" value="'. (GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key)?GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key):$fuser->conf->$offsettz) . '" size="2"></td>'; print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key.'" value="'. (GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key)?GETPOST('AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key):$object->conf->$offsettz) . '" size="2"></td>';
// Color (Possible colors are limited by Google) // Color (Possible colors are limited by Google)
print '<td class="nowrap" align="right">'; print '<td class="nowrap" align="right">';
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist); //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 '</td>'; print '</td>';
print "</tr>"; print "</tr>";
$i++; $i++;
@ -193,6 +199,7 @@ while ($i <= $MAXAGENDA)
print '</table>'; print '</table>';
dol_fiche_end(); dol_fiche_end();
print '<div class="center">'; print '<div class="center">';

View File

@ -1198,65 +1198,24 @@ else
{ {
dol_fiche_head($head, 'user', $title, 0, 'user'); dol_fiche_head($head, 'user', $title, 0, 'user');
$rowspan=19; dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<table class="border" width="100%">';
// Ref print '<div class="fichecenter">';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; print '<div class="fichehalfleft">';
print '<td colspan="3">';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>'."\n";
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $rowspan++; print '<div class="underbanner clearboth"></div>';
if (! empty($conf->societe->enabled)) $rowspan++; print '<table class="border tableforfield" width="100%">';
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 '<tr><td>'.$langs->trans("Lastname").'</td>';
print '<td colspan="2">'.$object->lastname.'</td>';
// Photo
print '<td align="center" valign="middle" width="25%" rowspan="'.$rowspan.'">';
print $form->showphoto('userphoto',$object,100);
print '</td>';
print '</tr>'."\n";
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td>';
print '<td colspan="2">'.$object->firstname.'</td>';
print '</tr>'."\n";
// Employee
print '<tr><td>'.$langs->trans("Employee").'</td><td colspan="2">';
print yn($object->employee);
print '</td></tr>'."\n";
// Position/Job
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
print '<td colspan="2">'.$object->job.'</td>';
print '</tr>'."\n";
// Gender
print '<tr><td>'.$langs->trans("Gender").'</td>';
print '<td>';
if ($object->gender) print $langs->trans("Gender".$object->gender);
print '</td></tr>';
// Login // Login
print '<tr><td>'.$langs->trans("Login").'</td>'; print '<tr><td>'.$langs->trans("Login").'</td>';
if (! empty($object->ldap_sid) && $object->statut==0) if (! empty($object->ldap_sid) && $object->statut==0)
{ {
print '<td colspan="2" class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>'; print '<td class="error">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>';
} }
else else
{ {
print '<td colspan="2">'.$object->login.'</td>'; print '<td>'.$object->login.'</td>';
} }
print '</tr>'."\n"; print '</tr>'."\n";
@ -1266,24 +1225,24 @@ else
{ {
if ($passDoNotExpire) if ($passDoNotExpire)
{ {
print '<td colspan="2">'.$langs->trans("LdapUacf_".$statutUACF).'</td>'; print '<td>'.$langs->trans("LdapUacf_".$statutUACF).'</td>';
} }
else if($userChangePassNextLogon) else if($userChangePassNextLogon)
{ {
print '<td colspan="2" class="warning">'.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).'</td>'; print '<td class="warning">'.$langs->trans("UserMustChangePassNextLogon",$ldap->domainFQDN).'</td>';
} }
else if($userDisabled) else if($userDisabled)
{ {
print '<td colspan="2" class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</td>'; print '<td class="warning">'.$langs->trans("LdapUacf_".$statutUACF,$ldap->domainFQDN).'</td>';
} }
else else
{ {
print '<td colspan="2">'.$langs->trans("DomainPassword").'</td>'; print '<td>'.$langs->trans("DomainPassword").'</td>';
} }
} }
else else
{ {
print '<td colspan="2">'; print '<td>';
if ($object->pass) print preg_replace('/./i','*',$object->pass); if ($object->pass) print preg_replace('/./i','*',$object->pass);
else else
{ {
@ -1294,17 +1253,33 @@ else
} }
print '</tr>'."\n"; print '</tr>'."\n";
// Employee
print '<tr><td>'.$langs->trans("Employee").'</td><td colspan="2">';
print yn($object->employee);
print '</td></tr>'."\n";
// Position/Job
print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
print '<td>'.$object->job.'</td>';
print '</tr>'."\n";
// Gender
print '<tr><td>'.$langs->trans("Gender").'</td>';
print '<td>';
if ($object->gender) print $langs->trans("Gender".$object->gender);
print '</td></tr>';
// API key // API key
if(! empty($conf->api->enabled) && $user->admin) { if(! empty($conf->api->enabled) && $user->admin) {
print '<tr><td>'.$langs->trans("ApiKey").'</td>'; print '<tr><td>'.$langs->trans("ApiKey").'</td>';
print '<td colspan="2">'; print '<td>';
if (! empty($object->api_key)) if (! empty($object->api_key))
print $langs->trans("Hidden"); print $langs->trans("Hidden");
print '<td>'; print '</td></tr>';
} }
// Administrator // Administrator
print '<tr><td>'.$langs->trans("Administrator").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("Administrator").'</td><td>';
if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity) if (! empty($conf->multicompany->enabled) && $object->admin && ! $object->entity)
{ {
print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin"); print $form->textwithpicto(yn($object->admin),$langs->trans("SuperAdministratorDesc"),1,"superadmin");
@ -1323,7 +1298,7 @@ else
print '<tr><td>'; print '<tr><td>';
$text=$langs->trans("Type"); $text=$langs->trans("Type");
print $form->textwithpicto($text, $langs->trans("InternalExternalDesc")); print $form->textwithpicto($text, $langs->trans("InternalExternalDesc"));
print '</td><td colspan="2">'; print '</td><td>';
$type=$langs->trans("Internal"); $type=$langs->trans("Internal");
if ($object->societe_id > 0) $type=$langs->trans("External"); if ($object->societe_id > 0) $type=$langs->trans("External");
print $type; print $type;
@ -1333,47 +1308,27 @@ else
// Ldap sid // Ldap sid
if ($object->ldap_sid) if ($object->ldap_sid)
{ {
print '<tr><td>'.$langs->trans("Type").'</td><td colspan="2">'; print '<tr><td>'.$langs->trans("Type").'</td><td>';
print $langs->trans("DomainUser",$ldap->domainFQDN); print $langs->trans("DomainUser",$ldap->domainFQDN);
print '</td></tr>'."\n"; print '</td></tr>'."\n";
} }
// Tel pro
print '<tr><td>'.$langs->trans("PhonePro").'</td>';
print '<td colspan="2">'.dol_print_phone($object->office_phone,'',0,0,1).'</td>';
print '</tr>'."\n";
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
print '<td colspan="2">'.dol_print_phone($object->user_mobile,'',0,0,1).'</td>';
print '</tr>'."\n";
// Fax
print '<tr><td>'.$langs->trans("Fax").'</td>';
print '<td colspan="2">'.dol_print_phone($object->office_fax,'',0,0,1).'</td>';
print '</tr>'."\n";
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->skype->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td>'; print '<tr><td>'.$langs->trans("Skype").'</td>';
print '<td colspan="2">'.dol_print_skype($object->skype,0,0,1).'</td>'; print '<td>'.dol_print_skype($object->skype,0,0,1).'</td>';
print "</tr>\n"; print "</tr>\n";
} }
// EMail
print '<tr><td>'.$langs->trans("EMail").'</td>';
print '<td colspan="2">'.dol_print_email($object->email,0,0,1).'</td>';
print "</tr>\n";
// Signature // Signature
print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td colspan="2">'; print '<tr><td class="tdtop">'.$langs->trans('Signature').'</td><td>';
print dol_htmlentitiesbr($object->signature); print dol_htmlentitiesbr($object->signature);
print "</td></tr>\n"; print "</td></tr>\n";
// Hierarchy // Hierarchy
print '<tr><td>'.$langs->trans("HierarchicalResponsible").'</td>'; print '<tr><td>'.$langs->trans("HierarchicalResponsible").'</td>';
print '<td colspan="2">'; print '<td>';
if (empty($object->fk_user)) print $langs->trans("None"); if (empty($object->fk_user)) print $langs->trans("None");
else { else {
$huser=new User($db); $huser=new User($db);
@ -1392,7 +1347,7 @@ else
$text=$langs->trans("THM"); $text=$langs->trans("THM");
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm'); print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
print '</td>'; print '</td>';
print '<td colspan="2">'; print '<td>';
print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):''); print ($object->thm!=''?price($object->thm,'',$langs,1,-1,-1,$conf->currency):'');
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
@ -1402,14 +1357,14 @@ else
$text=$langs->trans("TJM"); $text=$langs->trans("TJM");
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm'); print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
print '</td>'; print '</td>';
print '<td colspan="2">'; print '<td>';
print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):''); print ($object->tjm!=''?price($object->tjm,'',$langs,1,-1,-1,$conf->currency):'');
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
// Salary // Salary
print '<tr><td>'.$langs->trans("Salary").'</td>'; print '<tr><td>'.$langs->trans("Salary").'</td>';
print '<td colspan="2">'; print '<td>';
print ($object->salary!=''?price($object->salary,'',$langs,1,-1,-1,$conf->currency):''); print ($object->salary!=''?price($object->salary,'',$langs,1,-1,-1,$conf->currency):'');
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
@ -1417,7 +1372,7 @@ else
// Weeklyhours // Weeklyhours
print '<tr><td>'.$langs->trans("WeeklyHours").'</td>'; print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
print '<td colspan="2">'; print '<td>';
print price2num($object->weeklyhours); print price2num($object->weeklyhours);
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
@ -1426,38 +1381,39 @@ else
if ($conf->salaries->enabled) if ($conf->salaries->enabled)
{ {
print '<tr><td>'.$langs->trans("AccountancyCode").'</td>'; print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="2">'.$object->accountancy_code.'</td>'; print '<td>'.$object->accountancy_code.'</td>';
} }
// Color user // Color user
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
print '<tr><td>'.$langs->trans("ColorUser").'</td>'; print '<tr><td>'.$langs->trans("ColorUser").'</td>';
print '<td colspan="2">'; print '<td>';
print $formother->showColor($object->color, ''); print $formother->showColor($object->color, '');
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
} }
// Status print '</table>';
print '<tr><td>'.$langs->trans("Status").'</td>';
print '<td colspan="2">'; print '</div>';
print $object->getLibStatut(4); print '<div class="fichehalfright"><div class="ficheaddleft">';
print '</td>';
print '</tr>'."\n"; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
print '<tr><td>'.$langs->trans("LastConnexion").'</td>'; print '<tr><td>'.$langs->trans("LastConnexion").'</td>';
print '<td colspan="2">'.dol_print_date($object->datelastlogin,"dayhour").'</td>'; print '<td>'.dol_print_date($object->datelastlogin,"dayhour").'</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr><td>'.$langs->trans("PreviousConnexion").'</td>'; print '<tr><td>'.$langs->trans("PreviousConnexion").'</td>';
print '<td colspan="2">'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>'; print '<td>'.dol_print_date($object->datepreviouslogin,"dayhour").'</td>';
print "</tr>\n"; print "</tr>\n";
if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER)) if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file->main_authentication) && ! empty($conf->global->MAIN_OPENIDURL_PERUSER))
{ {
print '<tr><td>'.$langs->trans("OpenIDURL").'</td>'; print '<tr><td>'.$langs->trans("OpenIDURL").'</td>';
print '<td colspan="2">'.$object->openid.'</td>'; print '<td>'.$object->openid.'</td>';
print "</tr>\n"; print "</tr>\n";
} }
@ -1465,7 +1421,7 @@ else
if (! empty($conf->societe->enabled)) if (! empty($conf->societe->enabled))
{ {
print '<tr><td>'.$langs->trans("LinkToCompanyContact").'</td>'; print '<tr><td>'.$langs->trans("LinkToCompanyContact").'</td>';
print '<td colspan="2">'; print '<td>';
if (isset($object->societe_id) && $object->societe_id > 0) if (isset($object->societe_id) && $object->societe_id > 0)
{ {
$societe = new Societe($db); $societe = new Societe($db);
@ -1493,7 +1449,7 @@ else
{ {
$langs->load("members"); $langs->load("members");
print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>'; print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>';
print '<td colspan="2">'; print '<td>';
if ($object->fk_member) if ($object->fk_member)
{ {
$adh=new Adherent($db); $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) if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{ {
print '<tr><td>'.$langs->trans("Entity").'</td><td width="75%" class="valeur">'; print '<tr><td>'.$langs->trans("Entity").'</td><td>';
if (empty($object->entity)) if (empty($object->entity))
{ {
print $langs->trans("AllEntities"); print $langs->trans("AllEntities");
@ -1530,7 +1486,7 @@ else
} }
// Other attributes // 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 $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)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
@ -1538,6 +1494,11 @@ else
} }
print "</table>\n"; print "</table>\n";
print '</div>';
print '</div></div>';
print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
@ -1774,11 +1735,15 @@ else
print '<table width="100%" class="border">'; print '<table width="100%" class="border">';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>'; // Ref/ID
print '<td colspan="2">'; if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
{
print '<tr><td>'.$langs->trans("Ref").'</td>';
print '<td>';
print $object->id; print $object->id;
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
}
// Lastname // Lastname
print "<tr>"; print "<tr>";

View File

@ -73,49 +73,24 @@ llxHeader("","ClickToDial");
if ($id > 0) if ($id > 0)
{ {
$fuser = new User($db); $object = new User($db);
$fuser->fetch($id); $object->fetch($id);
$fuser->fetch_clicktodial(); $object->fetch_clicktodial();
/* $head = user_prepare_head($object);
* Affichage onglets
*/
$head = user_prepare_head($fuser);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'clicktodial', $title, 0, 'user'); dol_fiche_head($head, 'clicktodial', $title, 0, 'user');
/* dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
* Fiche en mode visu
*/
print '<table class="border" width="100%">'; print '<div class="underbanner clearboth"></div>';
// Ref
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
print '<td colspan="2">';
print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// Name
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n";
// Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n";
print "</table>\n";
print "<br>\n";
// Edit mode // Edit mode
if ($action == 'edit') if ($action == 'edit')
{ {
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$fuser->id.'" method="post">'; print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="action" value="update">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -124,8 +99,8 @@ if ($id > 0)
{ {
print '<tr><td width="25%" valign="top">ClickToDial URL</td>'; print '<tr><td width="25%" valign="top">ClickToDial URL</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print '<input name="url" value="'.(! empty($fuser->clicktodial_url)?$fuser->clicktodial_url:'').'" size="92">'; print '<input name="url" value="'.(! empty($object->clicktodial_url)?$object->clicktodial_url:'').'" size="92">';
if (empty($conf->global->CLICKTODIAL_URL) && empty($fuser->clicktodial_url)) if (empty($conf->global->CLICKTODIAL_URL) && empty($object->clicktodial_url))
{ {
$langs->load("errors"); $langs->load("errors");
print '<font class="error">'.$langs->trans("ErrorModuleSetupNotComplete").'</font>'; print '<font class="error">'.$langs->trans("ErrorModuleSetupNotComplete").'</font>';
@ -138,19 +113,19 @@ if ($id > 0)
print '</tr>'; print '</tr>';
} }
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>'; print '<tr><td class="titlefield">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print '<input name="poste" value="'.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'"></td>'; print '<input name="poste" value="'.(! empty($object->clicktodial_poste)?$object->clicktodial_poste:'').'"></td>';
print "</tr>\n"; print "</tr>\n";
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>'; print '<tr><td>ClickToDial '.$langs->trans("Login").'</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print '<input name="login" value="'.(! empty($fuser->clicktodial_login)?$fuser->clicktodial_login:'').'"></td>'; print '<input name="login" value="'.(! empty($object->clicktodial_login)?$object->clicktodial_login:'').'"></td>';
print '</tr>'; print '</tr>';
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>'; print '<tr><td>ClickToDial '.$langs->trans("Password").'</td>';
print '<td class="valeur">'; print '<td class="valeur">';
print '<input name="password" value="'.(! empty($fuser->clicktodial_password)?$fuser->clicktodial_password:'').'"></td>'; print '<input name="password" value="'.(! empty($object->clicktodial_password)?$object->clicktodial_password:'').'"></td>';
print "</tr>\n"; print "</tr>\n";
print '</table>'; print '</table>';
@ -169,10 +144,10 @@ if ($id > 0)
if (! empty($user->admin)) if (! empty($user->admin))
{ {
print "<tr>".'<td width="25%" valign="top">ClickToDial URL</td>'; print '<tr><td class="titlefield fieldrequired">ClickToDial URL</td>';
print '<td class="valeur">'; print '<td class="valeur">';
$url=$conf->global->CLICKTODIAL_URL; $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)) if (empty($url))
{ {
$langs->load("errors"); $langs->load("errors");
@ -180,28 +155,29 @@ if ($id > 0)
} }
else 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 '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }
print '<tr><td width="25%" valign="top" class="fieldrequired">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>'; print '<tr><td class="titlefield fieldrequired">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
print '<td class="valeur">'.(! empty($fuser->clicktodial_poste)?$fuser->clicktodial_poste:'').'</td>'; print '<td class="valeur">'.(! empty($object->clicktodial_poste)?$object->clicktodial_poste:'').'</td>';
print "</tr>"; print "</tr>";
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>'; print '<tr><td>ClickToDial '.$langs->trans("Login").'</td>';
print '<td class="valeur">'.(! empty($fuser->clicktodial_login)?$fuser->clicktodial_login:'').'</td>'; print '<td class="valeur">'.(! empty($object->clicktodial_login)?$object->clicktodial_login:'').'</td>';
print '</tr>'; print '</tr>';
print '<tr><td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>'; print '<tr><td>ClickToDial '.$langs->trans("Password").'</td>';
print '<td class="valeur">'.preg_replace('/./','*',(! empty($fuser->clicktodial_password)?$fuser->clicktodial_password:'')).'</a></td>'; print '<td class="valeur">'.preg_replace('/./','*',(! empty($object->clicktodial_password)?$object->clicktodial_password:'')).'</a></td>';
print "</tr>\n"; print "</tr>\n";
print "</table>\n"; print "</table>\n";
} }
print "</div>\n"; dol_fiche_end();
/* /*
* Barre d'actions * Barre d'actions
@ -210,11 +186,10 @@ if ($id > 0)
if (! empty($user->admin) && $action <> 'edit') if (! empty($user->admin) && $action <> 'edit')
{ {
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$fuser->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>'; print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("Modify").'</a>';
} }
print "</div>\n"; print "</div>\n";
print "<br>\n";
} }

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
@ -121,6 +121,9 @@ if ($object->id)
dol_fiche_head($head, 'document', $langs->trans("User"),0,'user'); dol_fiche_head($head, 'document', $langs->trans("User"),0,'user');
dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
// Construit liste des fichiers // Construit liste des fichiers
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
@ -133,20 +136,6 @@ if ($object->id)
print '<table class="border"width="100%">'; print '<table class="border"width="100%">';
// Reference
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.'&nbsp;</td>';
print '</tr>';
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.'&nbsp;</td></tr>';
// Login // Login
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.'&nbsp;</td></tr>';

View File

@ -54,6 +54,8 @@ if (($object->id != $user->id) && (! $user->rights->user->user->lire))
* View * View
*/ */
$form = new Form($db);
llxHeader(); llxHeader();
$object->info($id); $object->info($id);
@ -64,12 +66,24 @@ $title = $langs->trans("User");
dol_fiche_head($head, 'info', $title, 0, 'user'); dol_fiche_head($head, 'info', $title, 0, 'user');
print '<table width="100%"><tr><td>'; $linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<br>';
dol_print_object_info($object); dol_print_object_info($object);
print '</td></tr></table>';
print '</div>'; print '</div>';
$db->close();
dol_fiche_end();
llxFooter(); llxFooter();
$db->close();

View File

@ -89,27 +89,14 @@ $head = user_prepare_head($object);
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'ldap', $title, 0, 'user'); dol_fiche_head($head, 'ldap', $title, 0, 'user');
dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
print '<td>';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// Lastname
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
print '<td>'.$object->lastname.'</td>';
print "</tr>\n";
// Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$object->firstname.'</td>';
print "</tr>\n";
// Login // Login
print '<tr><td width="25%" valign="top">'.$langs->trans("Login").'</td>'; print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
if ($object->ldap_sid) if ($object->ldap_sid)
{ {
print '<td class="warning">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>'; print '<td class="warning">'.$langs->trans("LoginAccountDisableInDolibarr").'</td>';

View File

@ -87,33 +87,21 @@ if ($id)
$title = $langs->trans("User"); $title = $langs->trans("User");
dol_fiche_head($head, 'note', $title, 0, 'user'); dol_fiche_head($head, 'note', $title, 0, 'user');
if ($msg) print '<div class="error">'.$msg.'</div>'; dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">"; print "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']."\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Reference
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$object->lastname.'&nbsp;</td>';
print '</tr>';
// Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.'&nbsp;</td></tr>';
// Login // Login
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.'&nbsp;</td></tr>'; print '<tr><td class="titlefield">'.$langs->trans("Login").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';
// Note // Note
print '<tr><td class="tdtop">'.$langs->trans("Note").'</td>'; print '<tr><td class="tdtop">'.$langs->trans("Note").'</td>';
print '<td colspan="3">'; print '<td>';
if ($action == 'edit' && $user->rights->user->user->creer) if ($action == 'edit' && $user->rights->user->user->creer)
{ {
print "<input type=\"hidden\" name=\"action\" value=\"update\">"; print "<input type=\"hidden\" name=\"action\" value=\"update\">";

View File

@ -136,33 +136,18 @@ if ($action == 'edit')
} }
dol_fiche_head($head, 'guisetup', $title, 0, 'user');
print '<table class="border" width="100%">';
// Ref
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="2">';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>';
// LastName
print '<tr><td width="25%">'.$langs->trans("LastName").'</td>';
print '<td colspan="2">'.$object->lastname.'</td>';
print "</tr>\n";
// FirstName
print '<tr><td width="25%">'.$langs->trans("FirstName").'</td>';
print '<td colspan="2">'.$object->firstname.'</td>';
print "</tr>\n";
print '</table><br>';
if ($action == 'edit') if ($action == 'edit')
{ {
dol_fiche_head($head, 'guisetup', $title, 0, 'user');
dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
print '<br>';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{/* {/*
print '<script type="text/javascript" language="javascript"> print '<script type="text/javascript" language="javascript">
@ -250,11 +235,18 @@ if ($action == 'edit')
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
print '</div>'; print '</div>';
print '</form>';
} }
else else
{ {
dol_fiche_head($head, 'guisetup', $title, 0, 'user');
dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<div class="underbanner clearboth"></div>';
print '<br>';
$var=true; $var=true;
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -310,7 +302,10 @@ else
} }
dol_fiche_end(); if ($action == 'edit')
{
print '</form>';
}
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -251,28 +251,13 @@ else
/* /*
* Ecran ajout/suppression permission * Ecran ajout/suppression permission
*/ */
print '<table class="border" width="100%">';
// Ref dol_banner_tab($object,'id','',$user->rights->user->user->lire || $user->admin);
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
print '<td>';
print $form->showrefnav($object,'id','',$user->rights->user->user->lire || $user->admin);
print '</td>';
print '</tr>'."\n";
// Lastname
print '<tr><td width="25%">'.$langs->trans("Lastname").'</td>';
print '<td>'.$object->lastname.'</td>';
print '</tr>'."\n";
// Firstname print '<div class="underbanner clearboth"></div>';
print '<tr><td width="25%">'.$langs->trans("Firstname").'</td>';
print '<td>'.$object->firstname.'</td>';
print '</tr>'."\n";
print '</table><br>';
if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules")); if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
// Show warning about external users // Show warning about external users
@ -423,6 +408,7 @@ if ($result)
else dol_print_error($db); else dol_print_error($db);
print '</table>'; print '</table>';
// For multicompany transversal mode // For multicompany transversal mode
// TODO Place a hook here // TODO Place a hook here
if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode)) if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode))