diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index cfab373b62f..e63952a8341 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -793,7 +793,7 @@ if ($action == 'create') { // aaa $htmltext .= ''; - $availablelink = $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'helpclickable', '', 0, 2, 'availvar'); + $availablelink = $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'helpclickable', '', 0, 2, 'availvar'); //print ''.img_picto($langs->trans("ClickToShowDescription"), $imginfo).''; @@ -865,9 +865,12 @@ if ($action == 'create') { // aaa print ''.$langs->trans("MailTopic").''; print ''; - print ''.$langs->trans("BackgroundColorByDefault").''; - print $htmlother->selectColor(GETPOST('bgcolor'), 'bgcolor', '', 0); - print ''; + // Background color + /* if (getDolGlobalString('EMAILING_CAN_EDIT_BACKGROUND_COLOR')) { + print ''.$langs->trans("BackgroundColorByDefault").''; + print $htmlother->selectColor(GETPOST('bgcolor'), 'bgcolor', '', 0); + print ''; + } */ $formmail = new FormMail($db); $formmail->withfckeditor = 1; @@ -1330,9 +1333,11 @@ if ($action == 'create') { // aaa } // Background color - /*print ''.$langs->trans("BackgroundColorByDefault").''; - print $htmlother->selectColor($object->bgcolor,'bgcolor','',0); - print '';*/ + /* if (getDolGlobalString('EMAILING_CAN_EDIT_BACKGROUND_COLOR')) { + print ''.$langs->trans("BackgroundColorByDefault").''; + print $htmlother->selectColor($object->bgcolor,'bgcolor','',0); + print ''; + }*/ print ''; diff --git a/htdocs/core/ajax/mailtemplate.php b/htdocs/core/ajax/mailtemplate.php index 6e7cc2189f6..829ce1ced1b 100644 --- a/htdocs/core/ajax/mailtemplate.php +++ b/htdocs/core/ajax/mailtemplate.php @@ -84,7 +84,7 @@ if (GETPOSTISSET('template')) { $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $mycompanyaddress = $mysoc->getFullAddress(0, '
', 1, ''); + $mycompanyaddress = $mysoc->getFullAddress(0, ',', 1, ''); $specificSubstitutionArray = array( '__TITLEOFMAILHOLDER__' => $langs->trans('TitleOfMailHolder'), @@ -193,10 +193,10 @@ if (GETPOSTISSET('template')) { } $content = str_replace('__NEWS_LIST__', $newsList, $content); - $content = str_replace('__PRODUCTS_LIST__', $newsList, $content); + $content = str_replace('__PRODUCT_SELECTED__', $newsList, $content); } else { $content = str_replace('__NEWS_LIST__', $langs->trans("SelectSomeArticlesOrEnterYourOwnContent"), $content); - $content = str_replace('__PRODUCTS_LIST__', $langs->trans("SelectSomeArticlesOrEnterYourOwnContent"), $content); + $content = str_replace('__PRODUCT_SELECTED__', $langs->trans("SelectOneArticleOrEnterYourOwnContent"), $content); } print $content; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index efa6c84dcc7..b6294976fd4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2902,7 +2902,7 @@ class Form } } - $out .= ''; + $out .= ''; if ($hidelabel == 3) { $out .= img_picto($langs->trans("Search"), 'search'); } diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 74023c9f9e2..9127cc89a87 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1513,10 +1513,9 @@ class FormMail extends Form // Define list of email layouts to use $layouts = array( - 'empty' => 'empty', + 'none' => 'None', ); - - // Search available layouts on disk + // Add layouts found on disk in install/doctemplates/maillayout directory $arrayoflayoutemplates = dol_dir_list(DOL_DOCUMENT_ROOT.'/install/doctemplates/maillayout/', 'files', 0, '\.html$'); foreach ($arrayoflayoutemplates as $layouttemplatefile) { $layoutname = preg_replace('/\.html$/i', '', $layouttemplatefile['name']); @@ -1525,7 +1524,7 @@ class FormMail extends Form if ($layoutname == 'news' && (!in_array($showlinktolayout, array('emailing', 'websitepage')) || !isModEnabled('website'))) { continue; } - if ($layoutname == 'products' && (!in_array($showlinktolayout, array('emailing', 'websitepage')) || (!isModEnabled('product') && !isModEnabled('service')))) { + if ($layoutname == 'product' && (!in_array($showlinktolayout, array('emailing', 'websitepage')) || (!isModEnabled('product') && !isModEnabled('service')))) { continue; } @@ -1577,12 +1576,24 @@ class FormMail extends Form } // Use the multiselect array function to create the dropdown - $out .= '