Merge branch 'develop' into doactions-usercard
# Conflicts: # htdocs/user/agenda_extsites.php
This commit is contained in:
commit
87ad6e7941
@ -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.* *****
|
||||||
|
|||||||
@ -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 ' ';
|
print ' ';
|
||||||
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"> </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"> </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
|
||||||
|
|||||||
@ -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ódulo_Empresas');
|
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');
|
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();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -447,12 +447,29 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$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;
|
||||||
@ -461,7 +478,6 @@ 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++;
|
||||||
}
|
}
|
||||||
@ -473,18 +489,30 @@ abstract class CommonObject
|
|||||||
$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',' ','phone'); $outdone++;
|
$out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','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',' ','phone'); $outdone++;
|
$out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','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',' ','phone'); $outdone++;
|
$out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','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',' ','fax'); $outdone++;
|
$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.='<div style="clear: both;"></div>';
|
$out.='<div style="clear: both;"></div>';
|
||||||
@ -504,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -858,19 +858,21 @@ function dol_get_fiche_end($notab=0)
|
|||||||
*/
|
*/
|
||||||
function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='')
|
function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='')
|
||||||
{
|
{
|
||||||
global $conf, $form, $user;
|
global $conf, $form, $user, $langs;
|
||||||
|
|
||||||
//$showlogo=$object->logo;
|
//$showlogo=$object->logo;
|
||||||
$showlogo=1;
|
$showlogo=1;
|
||||||
$showbarcode=empty($conf->barcode->enabled)?0: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;
|
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%">';
|
print '<div class="arearef heightref valignmiddle" width="100%">';
|
||||||
//$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($modulepart,$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 ($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 ($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)) {
|
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');
|
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||||
} else {
|
} else {
|
||||||
$morehtmlright.=$object->getLibStatut(2);
|
$morehtmlright.=$object->getLibStatut(2);
|
||||||
@ -879,6 +881,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
$morehtmlref.='<div class="refidno">';
|
$morehtmlref.='<div class="refidno">';
|
||||||
$morehtmlref.=$object->getBannerAddress('refaddress',$object);
|
$morehtmlref.=$object->getBannerAddress('refaddress',$object);
|
||||||
$morehtmlref.='</div>';
|
$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 $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '<div class="underrefbanner clearboth"></div>';
|
print '<div class="underrefbanner clearboth"></div>';
|
||||||
@ -968,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;
|
||||||
@ -1487,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=" ",$withpicto='')
|
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='')
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs,$mysoc;
|
global $conf,$user,$langs,$mysoc;
|
||||||
|
|
||||||
@ -1569,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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1665,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;
|
||||||
@ -1672,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);
|
||||||
|
|||||||
@ -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 ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
print ' ('.$langs->trans("Default").': <strong>6e7896</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
@ -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':
|
||||||
|
|
||||||
|
|||||||
@ -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';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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>';
|
||||||
@ -2140,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)))
|
||||||
@ -2162,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)))
|
||||||
@ -2325,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);
|
||||||
@ -2349,8 +2357,9 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '</div></div></div>';
|
print '</div></div>';
|
||||||
print '<div style="clear:both"></div>';
|
print '<div style="clear:both"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -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 {
|
||||||
@ -2137,6 +2139,10 @@ border: none;
|
|||||||
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;
|
||||||
@ -2519,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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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,12 +670,12 @@ 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 {
|
||||||
@ -2381,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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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();
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
@ -104,11 +104,11 @@ if (empty($reshook)) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tabparam['AGENDA_EXT_NAME_'.$id.'_'.$i] = $name;
|
if (! $error)
|
||||||
$tabparam['AGENDA_EXT_SRC_'.$id.'_'.$i] = $src;
|
{
|
||||||
$tabparam['AGENDA_EXT_OFFSETTZ_'.$id.'_'.$i] = $offsettz;
|
$result=dol_set_user_param($db, $conf, $object, $tabparam);
|
||||||
$tabparam['AGENDA_EXT_COLOR_'.$id.'_'.$i] = $color;
|
if (! $result > 0) $error++;
|
||||||
$tabparam['AGENDA_EXT_ENABLED_'.$id.'_'.$i] = $enabled;
|
}
|
||||||
|
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
@ -149,10 +149,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";
|
||||||
|
|
||||||
@ -185,15 +191,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++;
|
||||||
@ -201,6 +207,7 @@ while ($i <= $MAXAGENDA)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
|
|||||||
@ -1153,60 +1153,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";
|
|
||||||
|
|
||||||
// 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";
|
||||||
|
|
||||||
@ -1216,24 +1180,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
|
||||||
{
|
{
|
||||||
@ -1244,17 +1208,28 @@ else
|
|||||||
}
|
}
|
||||||
print '</tr>'."\n";
|
print '</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");
|
||||||
@ -1273,7 +1248,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;
|
||||||
@ -1283,47 +1258,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);
|
||||||
@ -1342,7 +1297,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";
|
||||||
@ -1352,14 +1307,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";
|
||||||
@ -1367,7 +1322,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";
|
||||||
@ -1376,38 +1331,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";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1415,7 +1371,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);
|
||||||
@ -1443,7 +1399,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);
|
||||||
@ -1465,7 +1421,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");
|
||||||
@ -1480,7 +1436,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))
|
||||||
{
|
{
|
||||||
@ -1488,6 +1444,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();
|
||||||
|
|
||||||
@ -1724,11 +1685,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>";
|
||||||
|
|||||||
@ -81,49 +81,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%">';
|
||||||
@ -132,8 +107,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>';
|
||||||
@ -146,19 +121,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>';
|
||||||
@ -177,10 +152,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");
|
||||||
@ -188,28 +163,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
|
||||||
@ -218,11 +194,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.'&action=edit">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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>
|
||||||
@ -129,6 +129,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);
|
||||||
@ -141,20 +144,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.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.' </td></tr>';
|
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.' </td></tr>';
|
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.' </td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
@ -93,27 +93,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>';
|
||||||
|
|||||||
@ -89,33 +89,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.' </td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Firstname
|
|
||||||
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$object->firstname.' </td></tr>';
|
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$object->login.' </td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Login").'</td><td class="valeur">'.$object->login.' </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\">";
|
||||||
|
|||||||
@ -147,33 +147,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">
|
||||||
@ -261,11 +246,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%">';
|
||||||
@ -321,7 +313,10 @@ else
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
if ($action == 'edit')
|
||||||
|
{
|
||||||
|
print '</form>';
|
||||||
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -256,26 +256,11 @@ 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
|
||||||
@ -426,6 +411,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))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user