Skip to content

Commit

Permalink
Fix template email message html/nohtml
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 27, 2018
1 parent 9eaca04 commit 6fc6a74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions htdocs/core/class/html.formmail.class.php
Expand Up @@ -936,10 +936,10 @@ function get_form($addfileaction='addfile', $removefileaction='removefile')

$validpaymentmethod = getValidOnlinePaymentMethods($paymentmethod);
}
var_dump($validpaymentmethod);
if (count($validpaymentmethod) > 0)

if (count($validpaymentmethod) > 0 && $paymenturl)
{
$this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__']=($paymenturl?$langs->trans("PredefinedMailContentLink", $paymenturl):'');
$this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__']=str_replace('\n',"\n",$langs->transnoentities("PredefinedMailContentLink", $paymenturl));
$this->substit['__ONLINE_PAYMENT_URL__']=$paymenturl;
}
else
Expand All @@ -963,7 +963,7 @@ function get_form($addfileaction='addfile', $removefileaction='removefile')
$defaultmessage=str_replace('\n',"\n",$defaultmessage);

// Deal with format differences between message and signature (text / HTML)
if(dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
$this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']);
} else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
$defaultmessage = dol_nl2br($defaultmessage);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/other.lang
Expand Up @@ -91,7 +91,7 @@ PredefinedMailContentSendShipping=__(Hello)__\n\nYou will find here the shipping
PredefinedMailContentSendFichInter=__(Hello)__\n\nYou will find here the intervention __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.<br><br>%s<br><br>
PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n
DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available.
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
Expand Down

0 comments on commit 6fc6a74

Please sign in to comment.