2
0
forked from Wavyzz/dolibarr

Use the new card banner for members

This commit is contained in:
Laurent Destailleur
2015-10-16 16:14:33 +02:00
parent ebdc402832
commit df0c6aa5cf
7 changed files with 97 additions and 129 deletions

View File

@@ -84,16 +84,14 @@ if ($object->id > 0)
dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user'); dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
// Reference dol_banner_tab($object, 'rowid', $linkback);
print '<tr><td width="20%">'.$langs->trans('Ref').'</td>';
print '<td colspan="3">'; print '<div class="fichecenter">';
print $form->showrefnav($object, 'id', $linkback);
print '</td>'; print '<div class="underbanner clearboth"></div>';
print '</tr>'; print '<table class="border centpercent">';
// Login // Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
@@ -101,6 +99,9 @@ if ($object->id > 0)
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';
} }
// Type
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
// Morphy // Morphy
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>'; print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">'; /*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
@@ -108,9 +109,6 @@ if ($object->id > 0)
print '</td>';*/ print '</td>';*/
print '</tr>'; print '</tr>';
// Type
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
// Company // Company
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>'; print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
@@ -132,6 +130,8 @@ if ($object->id > 0)
print '</div>'; print '</div>';
dol_fiche_end();
/* /*
* Barre d'action * Barre d'action

View File

@@ -802,13 +802,6 @@ else
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$object->login).'"></td></tr>'; print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td><input type="text" name="member_login" size="40" value="'.(isset($_POST["member_login"])?$_POST["member_login"]:$object->login).'"></td></tr>';
} }
// Moral-Physique
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td class="fieldrequired">'.$langs->trans("Nature")."</td><td>\n";
print $form->selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1);
print "</td>\n";
// Type // Type
print '<tr><td class="fieldrequired">'.$langs->trans("MemberType").'</td><td>'; print '<tr><td class="fieldrequired">'.$langs->trans("MemberType").'</td><td>';
$listetype=$adht->liste_array(); $listetype=$adht->liste_array();
@@ -820,6 +813,13 @@ else
} }
print "</td>\n"; print "</td>\n";
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td class="fieldrequired">'.$langs->trans("Nature")."</td><td>\n";
print $form->selectarray("morphy", $morphys, GETPOST('morphy','alpha')?GETPOST('morphy','alpha'):$object->morphy, 1);
print "</td>\n";
// Company // Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(GETPOST('societe','alpha')?GETPOST('societe','alpha'):$object->societe).'"></td></tr>'; print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" size="40" value="'.(GETPOST('societe','alpha')?GETPOST('societe','alpha'):$object->societe).'"></td></tr>';
@@ -1050,7 +1050,7 @@ else
print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$object->login).'"></td></tr>'; print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").' / '.$langs->trans("Id").'</span></td><td colspan="2"><input type="text" name="login" size="30" value="'.(isset($_POST["login"])?$_POST["login"]:$object->login).'"></td></tr>';
} }
// Physique-Moral // Morphy
$morphys["phy"] = $langs->trans("Physical"); $morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Morale"); $morphys["mor"] = $langs->trans("Morale");
print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>'; print '<tr><td><span class="fieldrequired">'.$langs->trans("Nature").'</span></td><td>';
@@ -1402,37 +1402,29 @@ else
if (! empty($conf->societe->enabled)) $rowspan++; if (! empty($conf->societe->enabled)) $rowspan++;
if (! empty($conf->skype->enabled)) $rowspan++; if (! empty($conf->skype->enabled)) $rowspan++;
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
// Ref dol_banner_tab($object, 'rowid', $linkback);
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
print '<td class="valeur" colspan="2">'; print '<div class="fichecenter">';
print $form->showrefnav($object, 'rowid', $linkback); print '<div class="fichehalfleft">';
print '</td></tr>';
print '<div class="underbanner clearboth"></div>';
$showphoto='<td rowspan="'.$rowspan.'" align="center" class="hideonsmartphone" valign="middle" width="25%">'; print '<table class="border centpercent">';
$showphoto.=$form->showphoto('memberphoto',$object);
$showphoto.='</td>';
// Login // Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{ {
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td></tr>';
// Photo
print $showphoto; $showphoto='';
print '</tr>';
} }
// Morphy
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
print $showphoto; $showphoto='';
print '</tr>';
// Type // Type
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n"; print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
// Morphy
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
print '</tr>';
// Company // Company
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>'; print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
@@ -1447,9 +1439,6 @@ else
// Firstname // Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$object->firstname.'&nbsp;</td></tr>';
// EMail
print '<tr><td>'.$langs->trans("EMail").'</td><td class="valeur">'.dol_print_email($object->email,0,$object->fk_soc,1).'</td></tr>';
// Password // Password
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{ {
@@ -1463,48 +1452,26 @@ else
print '</td></tr>'; print '</td></tr>';
} }
// Address
print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">';
dol_print_address($object->address,'gmap','member',$object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td></tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">';
$img=picto_from_langcode($object->country_code);
if ($img) print $img.' ';
print getCountry($object->country_code);
print '</td></tr>';
// State
print '<tr><td>'.$langs->trans('State').'</td><td class="valeur">'.$object->state.'</td>';
// Tel pro.
print '<tr><td>'.$langs->trans("PhonePro").'</td><td class="valeur">'.dol_print_phone($object->phone,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
// Tel perso
print '<tr><td>'.$langs->trans("PhonePerso").'</td><td class="valeur">'.dol_print_phone($object->phone_perso,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
// Tel mobile
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
// Skype // Skype
if (! empty($conf->skype->enabled)) if (! empty($conf->skype->enabled))
{ {
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>'; print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</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%">';
// Birthday // Birthday
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>'; print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
// Public // Public
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>'; print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
// Status
print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$object->getLibStatut(4).'</td></tr>';
// Categories // Categories
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{ {
@@ -1594,12 +1561,16 @@ else
print "</table>\n"; print "</table>\n";
print "</div>\n"; print "</div></div></div>\n";
print '<div style="clear:both"></div>';
dol_fiche_end();
/* /*
* Hotbar * Hotbar
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been

View File

@@ -567,34 +567,31 @@ if ($rowid > 0)
dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user'); dol_fiche_head($head, 'subscription', $langs->trans("Member"), 0, 'user');
print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
// Ref dol_banner_tab($object, 'rowid', $linkback);
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
print '<td class="valeur" colspan="2">'; print '<div class="fichecenter">';
print $form->showrefnav($object, 'rowid', $linkback);
print '</td></tr>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
$showphoto='<td rowspan="'.$rowspan.'" class="hideonsmartphone" align="center" valign="middle" width="25%">'.$form->showphoto('memberphoto',$object).'</td>';
// Login // Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
{ {
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td>'; print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.'&nbsp;</td>';
print $showphoto; $showphoto=''; print $showphoto; $showphoto='';
print '</tr>'; print '</tr>';
} }
// Type
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
// Morphy // Morphy
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>'; print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
print $showphoto; $showphoto=''; print $showphoto; $showphoto='';
print '</tr>'; print '</tr>';
// Type
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
// Company // Company
print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>'; print '<tr><td>'.$langs->trans("Company").'</td><td class="valeur">'.$object->societe.'</td></tr>';
@@ -701,14 +698,13 @@ if ($rowid > 0)
print "</table>\n"; print "</table>\n";
print '</div>';
dol_fiche_end(); dol_fiche_end();
print '</form>'; print '</form>';
dol_htmloutput_errors($errmsg,$errmsgs);
/* /*
* Hotbar * Hotbar
*/ */

View File

@@ -447,18 +447,18 @@ abstract class CommonObject
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR');
$contacti=0; $contactid=0;
$thirdpartyid=0; $thirdpartyid=0;
if ($this->elemet == 'societe') if ($this->element == 'societe')
{ {
$thirdpartyid=$this->id; $thirdpartyid=$this->id;
} }
if ($this->elemet == 'contact') if ($this->element == 'contact')
{ {
$contactid=$this->id; $contactid=$this->id;
$thirdpartyid=$object->fk_soc; $thirdpartyid=$object->fk_soc;
} }
if ($this->elemet == 'user') if ($this->element == 'user')
{ {
$contactid=$this->contact_id; $contactid=$this->contact_id;
$thirdpartyid=$object->fk_soc; $thirdpartyid=$object->fk_soc;
@@ -489,40 +489,40 @@ abstract class CommonObject
$outdone++; $outdone++;
} }
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 (! empty($this->phone_pro) || ! empty($this->phone_mobile) || ! empty($this->phone_perso) || ! empty($this->fax) || ! empty($this->office_phone) || ! empty($this->user_mobile) || ! empty($this->office_fax)) $out.=($outdone?'<br>':'');
if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone if (! empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
$out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++; $out.=dol_print_phone($this->phone,$this->country_code,$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
} }
if (! empty($this->phone_pro)) { if (! empty($this->phone_pro)) {
$out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++; $out.=dol_print_phone($this->phone_pro,$this->country_code,$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
} }
if (! empty($this->phone_mobile)) { if (! empty($this->phone_mobile)) {
$out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++; $out.=dol_print_phone($this->phone_mobile,$this->country_code,$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++;
} }
if (! empty($this->phone_perso)) { if (! empty($this->phone_perso)) {
$out.=dol_print_phone($this->phone_perso,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePerso")); $outdone++; $out.=dol_print_phone($this->phone_perso,$this->country_code,$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePerso")); $outdone++;
} }
if (! empty($this->fax)) { if (! empty($this->fax)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++; $out.=dol_print_phone($this->fax,$this->country_code,$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
} }
if (! empty($this->office_phone)) { if (! empty($this->office_phone)) {
$out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++; $out.=dol_print_phone($this->office_phone,$this->country_code,$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhonePro")); $outdone++;
} }
if (! empty($this->user_mobile)) { if (! empty($this->user_mobile)) {
$out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++; $out.=dol_print_phone($this->user_mobile,$this->country_code,$contactid,$thirdpartyid,'AC_TEL','&nbsp;','phone',$langs->trans("PhoneMobile")); $outdone++;
} }
if (! empty($this->office_fax)) { if (! empty($this->office_fax)) {
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++; $out.=dol_print_phone($this->fax,$this->country_code,$contactid,$thirdpartyid,'AC_FAX','&nbsp;','fax',$langs->trans("Fax")); $outdone++;
} }
$out.='<div style="clear: both;"></div>'; $out.='<div style="clear: both;"></div>';
$outdone=0; $outdone=0;
if ($this->email) if (! empty($this->email))
{ {
$out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1); $out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1);
$outdone++; $outdone++;
} }
if ($this->url) if (! empty($this->url))
{ {
$out.=dol_print_url($this->url,'',0,1); $out.=dol_print_url($this->url,'',0,1);
$outdone++; $outdone++;

View File

@@ -732,7 +732,8 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
$limittoshow=(empty($conf->global->MAIN_MAXTABS_IN_CARD)?99:$conf->global->MAIN_MAXTABS_IN_CARD); $limittoshow=(empty($conf->global->MAIN_MAXTABS_IN_CARD)?99:$conf->global->MAIN_MAXTABS_IN_CARD);
$displaytab=0; $displaytab=0;
$nbintab=0; $nbintab=0;
$popuptab=0;
for ($i = 0 ; $i <= $maxkey ; $i++) for ($i = 0 ; $i <= $maxkey ; $i++)
{ {
if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2])) if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2]))
@@ -1496,30 +1497,30 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
/** /**
* Format phone numbers according to country * Format phone numbers according to country
* *
* @param string $phone Phone number to format * @param string $phone Phone number to format
* @param string $country Country code to use for formatting * @param string $countrycode Country code to use for formatting
* @param int $cid Id of contact if known * @param int $cid Id of contact if known
* @param int $socid Id of third party if known * @param int $socid Id of third party if known
* @param 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 * @param string $titlealt Text to show on alt
* @return string Formated phone number * @return string Formated phone number
*/ */
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="&nbsp;",$withpicto='',$titlealt='') function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$separ="&nbsp;",$withpicto='',$titlealt='')
{ {
global $conf,$user,$langs,$mysoc; global $conf,$user,$langs,$mysoc;
// Clean phone parameter // Clean phone parameter
$phone = preg_replace("/[\s.-]/","",trim($phone)); $phone = preg_replace("/[\s.-]/","",trim($phone));
if (empty($phone)) { return ''; } if (empty($phone)) { return ''; }
if (empty($country)) $country=$mysoc->country_code; if (empty($countrycode)) $countrycode=$mysoc->country_code;
// Short format for small screens // Short format for small screens
if ($conf->dol_optimize_smallscreen) $separ=''; if ($conf->dol_optimize_smallscreen) $separ='';
$newphone=$phone; $newphone=$phone;
if (strtoupper($country) == "FR") if (strtoupper($countrycode) == "FR")
{ {
// France // France
if (dol_strlen($phone) == 10) { if (dol_strlen($phone) == 10) {

View File

@@ -186,13 +186,13 @@ if ($result > 0)
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
// Help
print '<br>'.$langs->trans("NotificationsDesc");
print '</div>'; print '</div>';
dol_fiche_end(); dol_fiche_end();
// Help
print $langs->trans("NotificationsDesc").'<br><br>';
print "\n"; print "\n";
// Add notification form // Add notification form
@@ -221,12 +221,12 @@ if ($result > 0)
// Load array of available notifications // Load array of available notifications
$notificationtrigger=new InterfaceNotification($db); $notificationtrigger=new InterfaceNotification($db);
$listofnotifiedevents=$notificationtrigger->getListOfManagedEvents(); $listofmanagedeventfornotification=$notificationtrigger->getListOfManagedEvents();
foreach($listofnotifiedevents as $notifiedevent) foreach($listofmanagedeventfornotification as $managedeventfornotification)
{ {
$label=($langs->trans("Notify_".$notifiedevent['code'])!="Notify_".$notifiedevent['code']?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label']); $label=($langs->trans("Notify_".$managedeventfornotification['code'])!="Notify_".$managedeventfornotification['code']?$langs->trans("Notify_".$managedeventfornotification['code']):$managedeventfornotification['label']);
$actions[$notifiedevent['rowid']]=$label; $actions[$managedeventfornotification['rowid']]=$label;
} }
print '<tr '.$bc[$var].'><td>'; print '<tr '.$bc[$var].'><td>';
print $form->selectarray("contactid",$listofemails); print $form->selectarray("contactid",$listofemails);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 675 B