diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index e104db4dcda..0d096f1ecef 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -231,7 +231,7 @@ if ($object->fetch($id) >= 0) $var=!$var; - $allowaddtarget=($object->statut == 0); + $allowaddtarget=($object->statut == 0 || $object->statut == 1); // Show email selectors if ($allowaddtarget && $user->rights->mailing->creer) diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index cd0f229983d..737b239498f 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -26,6 +26,7 @@ include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; class mailing_advthirdparties extends MailingTargets { var $name='ThirdPartyAdvancedTargeting'; + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc="Third parties"; var $require_admin=0; diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 99de75c6d26..02bcc17ec30 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -34,12 +34,12 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_contacts1 extends MailingTargets { var $name='ContactCompanies'; // Identifiant du module mailing - // This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found - var $desc='Contacts des tiers (prospects, clients, fournisseurs...)'; + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + var $desc='Contacts of thirdparties (prospects, customers, suppliers...)'; var $require_module=array("societe"); // Module mailing actif si modules require_module actifs var $require_admin=0; // Module mailing actif pour user admin ou non var $picto='contact'; - + var $db; diff --git a/htdocs/core/modules/mailings/contacts2.modules.php b/htdocs/core/modules/mailings/contacts2.modules.php index 08e92af45e8..778b2182e1a 100644 --- a/htdocs/core/modules/mailings/contacts2.modules.php +++ b/htdocs/core/modules/mailings/contacts2.modules.php @@ -33,7 +33,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_contacts2 extends MailingTargets { var $name='ContactsByFunction'; - // This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc='Add contacts by function'; var $require_admin=0; diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index b9878fd1c83..2c142541023 100644 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -32,8 +32,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_contacts3 extends MailingTargets { var $name='ContactsByCompanyCategory'; - // This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found - var $desc='Add contacts by company category'; + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + var $desc='Add contacts by company category'; var $require_admin=0; var $require_module=array(); diff --git a/htdocs/core/modules/mailings/contacts4.modules.php b/htdocs/core/modules/mailings/contacts4.modules.php index 421fd2676c8..a79d48a03e4 100644 --- a/htdocs/core/modules/mailings/contacts4.modules.php +++ b/htdocs/core/modules/mailings/contacts4.modules.php @@ -32,8 +32,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_contacts4 extends MailingTargets { var $name='ContactsByCategory'; - // This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found - var $desc='Add contacts by category'; + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + var $desc='Add contacts by category'; var $require_admin=0; var $require_module=array(); diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index f0f8b99e3c5..548510f81a0 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -32,7 +32,9 @@ class mailing_example extends MailingTargets var $desc='Put here a description'; // CHANGE THIS: Set to 1 if selector is available for admin users only var $require_admin=0; - + // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector + var $tooltip='MyTooltipLangKey'; + var $require_module=array(); var $picto=''; var $db; diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 089c42d4950..05d9e525652 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -32,12 +32,10 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; */ class mailing_fraise extends MailingTargets { - // CHANGE THIS: Put here a name not already used var $name='FundationMembers'; // Identifiant du module mailing - // CHANGE THIS: Put here a description of your selector module. - // This label is used if no translation found for key MailingModuleDescXXX where XXX=name is found + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc='Foundation members with emails (by status)'; - // CHANGE THIS: Set to 1 if selector is available for admin users only + // Set to 1 if selector is available for admin users only var $require_admin=0; var $require_module=array('adherent'); diff --git a/htdocs/core/modules/mailings/framboise.modules.php b/htdocs/core/modules/mailings/framboise.modules.php index a30a9ba3c17..82f7e51e0ef 100644 --- a/htdocs/core/modules/mailings/framboise.modules.php +++ b/htdocs/core/modules/mailings/framboise.modules.php @@ -23,12 +23,10 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; */ class mailing_framboise extends MailingTargets { - // CHANGE THIS: Put here a name not already used var $name='MembersCategories'; - // CHANGE THIS: Put here a description of your selector module. - // This label is used if no translation found for key MailingModuleDescXXX where XXX=name is found + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc="Foundation members with emails (by categories)"; - // CHANGE THIS: Set to 1 if selector is available for admin users only + // Set to 1 if selector is available for admin users only var $require_admin=0; var $require_module=array("adherent","categorie"); diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index 16b930e8907..1a97f3502b7 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -49,7 +49,7 @@ class MailingTargets // This can't be abstract as it is used for some method /** * Return description of email selector * - * @return string Retourne la traduction de la cle MailingModuleDescXXX ou XXX nom du module, ou $this->desc si non trouve + * @return string Return translation of module label. Try translation of $this->name then translation of 'MailingModuleDesc'.$this->name, or $this->desc if not found */ function getDesc() { @@ -58,7 +58,9 @@ class MailingTargets // This can't be abstract as it is used for some method $langs->load("mails"); $transstring="MailingModuleDesc".$this->name; $s=''; - if ($langs->trans($transstring) != $transstring) $s=$langs->trans($transstring); + + if ($langs->trans($this->name) != $this->name) $s=$langs->trans($this->name); + elseif ($langs->trans($transstring) != $transstring) $s=$langs->trans($transstring); else $s=$this->desc; if ($this->tooltip && is_object($form)) $s .= ' '.$form->textwithpicto('', $langs->trans($this->tooltip), 1, 1); diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 3db13ac824c..5824f456365 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -31,6 +31,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_pomme extends MailingTargets { var $name='DolibarrUsers'; // Identifiant du module mailing + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc='Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e var $require_module=array(); // Module mailing actif si modules require_module actifs var $require_admin=1; // Module mailing actif pour user admin ou non diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index cfccc1ff673..55cce13fbcf 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -24,6 +24,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_thirdparties extends MailingTargets { var $name='ContactsCategories'; + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc="Third parties (by categories)"; var $require_admin=0; diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 39790959b97..de92354a964 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -23,6 +23,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; class mailing_thirdparties_services_expired extends MailingTargets { var $name='DolibarrContractsLinesExpired'; + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc='Third parties with expired contract\'s lines'; var $require_admin=0; diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index 04c4be3ce2e..152322c2899 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; class mailing_xinputfile extends MailingTargets { var $name='EmailsFromFile'; // Identifiant du module mailing + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc='EMails from a file'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e var $require_module=array(); // Module mailing actif si modules require_module actifs var $require_admin=0; // Module mailing actif pour user admin ou non diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 4c5567f574d..794de3d9294 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; class mailing_xinputuser extends MailingTargets { var $name='EmailsFromUser'; // Identifiant du module mailing + // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found var $desc='EMails input by user'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e var $require_module=array(); // Module mailing actif si modules require_module actifs var $require_admin=0; // Module mailing actif pour user admin ou non diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 0c894cc7b19..879f4469478 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -74,7 +74,10 @@ ResultOfMailSending=Result of mass EMail sending NbSelected=Nb selected NbIgnored=Nb ignored NbSent=Nb sent -ContactsWithThirdpartyFilter=Contact with customer filters +MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters +MailingModuleDescContactsByCompanyCategory=Contacts by third party category +MailingModuleDescContactsByCategory=Contacts by categories +MailingModuleDescContactsByFunction=Contacts by position # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index ce5b7f3761e..6731b541423 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2778,6 +2778,9 @@ tr.even td, tr.pair td, tr.odd td, tr.impair td, form.odd div.tagtd, form.impair padding: 5px 2px 5px 3px; border-bottom: 1px solid #ddd; } +form.pair, form.impair { + font-weight: normal; +} form.tagtr:last-of-type div.tagtd, tr.even:last-of-type td, tr.pair:last-of-type td, tr.odd:last-of-type td, tr.impair:last-of-type td { border-bottom: 0px !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f1caa8e13a1..5fe8597b04c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2651,6 +2651,9 @@ tr.even td, tr.pair td, tr.odd td, tr.impair td, form.odd div.tagtd, form.impair padding: 5px 2px 5px 3px; border-bottom: 1px solid #eee; } +form.pair, form.impair { + font-weight: normal; +} tr.even:last-of-type td, tr.pair:last-of-type td, tr.odd:last-of-type td, tr.impair:last-of-type td { border-bottom: 0px !important; }