From 59f543e1963f999d43d540e7982b22682bd6f424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9=20GDSOFT?= Date: Wed, 6 Jul 2022 18:21:33 +0200 Subject: [PATCH 1/3] utilisation du doleditor pour l'edition du corps du mail --- fiche-rec-tab1.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/fiche-rec-tab1.php b/fiche-rec-tab1.php index 4d55f06..de2b8f8 100644 --- a/fiche-rec-tab1.php +++ b/fiche-rec-tab1.php @@ -147,7 +147,7 @@ do { $mailObject->sendcc_thirdparty = in_array('thirdparty', GETPOST('sendcc_socpeople', 'array')); $mailObject->subject = GETPOST('subject', 'alpha'); - $mailObject->body = GETPOST('body', 'alpha'); + $mailObject->body = GETPOST('body', 'restricthtml'); $mailObject->body_ishtml = (int)GETPOST('body_ishtml', 'int'); // Save into database @@ -300,16 +300,15 @@ do { $output .= ''; $output .= $form->textwithpicto($langs->trans("MailText"), $helpforsubstitution, 1, 'help', '', 0, 2, 'substittooltipfrombody'); $output .= "\n"; - /* - // doleditor does some weird stuff, adding
and newlines, I'll get more into it when I have time. - // fallback to simple \n"; + + // $output .= '\n"; $output .= "\n"; // body_ishtml @@ -337,4 +336,4 @@ do { // Print everything llxHeader('', $langs->trans('RepeatableInvoice') . ' - ' . $langs->trans('SendingByMail'), ''); print $output; -llxFooter(); +llxFooter(); \ No newline at end of file From 60b4a1fd99cb6dbabc38b59599a7eb029d4e468f Mon Sep 17 00:00:00 2001 From: Chl Date: Sat, 23 Jul 2022 19:48:22 +0200 Subject: [PATCH 2/3] Suite utilisation du doleditor: selon config. globale --- fiche-rec-tab1.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/fiche-rec-tab1.php b/fiche-rec-tab1.php index de2b8f8..1e8ac04 100644 --- a/fiche-rec-tab1.php +++ b/fiche-rec-tab1.php @@ -300,15 +300,21 @@ do { $output .= ''; $output .= $form->textwithpicto($langs->trans("MailText"), $helpforsubstitution, 1, 'help', '', 0, 2, 'substittooltipfrombody'); $output .= "\n"; - + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('body', (GETPOST('body', 'alpha') ? GETPOST('body', 'alpha') : $mailObject->body), '', 280,'dolibarr_notes'); + $doleditor = new DolEditor( + 'body', + (GETPOST('body', 'alpha') ? GETPOST('body', 'alpha') : $mailObject->body), + '', + 280, + 'dolibarr_mailings', // toolbar name + 'In', // toolbar location + false, // toolbar start expanded + true, // use local browser + !empty($conf->global->FCKEDITOR_ENABLE_MAIL) // follow global conf about using ckeditor for mails. + ); $output .= $doleditor->Create(1); - - // $output .= '\n"; $output .= "\n"; // body_ishtml @@ -336,4 +342,4 @@ do { // Print everything llxHeader('', $langs->trans('RepeatableInvoice') . ' - ' . $langs->trans('SendingByMail'), ''); print $output; -llxFooter(); \ No newline at end of file +llxFooter(); From 38a96d7ac2b2844534586cd7e886a6ce717a1d77 Mon Sep 17 00:00:00 2001 From: Chl Date: Sat, 23 Jul 2022 19:50:27 +0200 Subject: [PATCH 3/3] Bump version --- core/modules/modsendrecurringinvoicebymail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/modsendrecurringinvoicebymail.class.php b/core/modules/modsendrecurringinvoicebymail.class.php index b1153c4..724b0d1 100644 --- a/core/modules/modsendrecurringinvoicebymail.class.php +++ b/core/modules/modsendrecurringinvoicebymail.class.php @@ -69,7 +69,7 @@ class modsendrecurringinvoicebymail extends DolibarrModules $this->editor_url = 'https://code.bugness.org/Dolibarr/sendrecurringinvoicebymail'; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' - $this->version = '0.3.2'; + $this->version = '0.3.3'; //Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt';