diff --git a/ChangeLog b/ChangeLog index 3a6f5c34eda..830a767ca06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.7 compared to 3.6.* ***** For users: +- New: Add number of active notification into tab title (like we do for notes and documents) - New: Can add product into category from category card. - New: PDF event report show project and status of event. - New: Can filter on status on interventions. diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index f3abf9e2bfe..1ba775268a1 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -241,13 +241,20 @@ if (empty($reshook)) $result = $object->delete(); if ($result > 0) { - header("Location: ".DOL_URL_ROOT.'/contact/list.php'); - exit; + if ($backtopage) + { + header("Location: ".$backtopage); + exit; + } + else + { + header("Location: ".DOL_URL_ROOT.'/contact/list.php'); + exit; + } } else { - setEventMessage($object->error,'errors'); - setEventMessage($object->errors,'errors'); + setEventMessage($object->error,$object->errors,'errors'); } } @@ -360,7 +367,7 @@ else { if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage?'&backtopage='.$backtopage:''),$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); } } @@ -1082,27 +1089,27 @@ else { if ($user->rights->societe->contact->creer) { - print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Modify').''; } if (! $object->user_id && $user->rights->user->user->creer) { - print ''.$langs->trans("CreateDolibarrLogin").''; + print ''.$langs->trans("CreateDolibarrLogin").''; } if ($user->rights->societe->contact->supprimer) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } // Activer if ($object->statut == 0 && $user->rights->societe->contact->creer) { - print ''.$langs->trans("Reactivate").''; + print ''.$langs->trans("Reactivate").''; } // Desactiver if ($object->statut == 1 && $user->rights->societe->contact->creer) { - print ''.$langs->trans("DisableUser").''; + print ''.$langs->trans("DisableUser").''; } } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 9e93523a654..3f81608c415 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -877,20 +877,21 @@ class Contact extends CommonObject * @param int $withpicto Include picto with link * @param string $option Where the link point to * @param int $maxlen Max length of + * @param string $moreparam Add more param into URL * @return string String with URL */ - function getNomUrl($withpicto=0,$option='',$maxlen=0) + function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='') { global $langs; $result=''; - $lien = ''; + $lien = ''; $lienfin=''; if ($option == 'xxx') { - $lien = ''; + $lien = ''; $lienfin=''; } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 8c53356fa67..50c681d8366 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -474,14 +474,14 @@ class FormFile // Model if (! empty($modellist)) { - $out.= '