From 0173d8db5f9e3f1162303d0424c430ec59ca0296 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Fri, 7 May 2021 17:09:59 +0200 Subject: [PATCH 1/7] Add substitution key for membernewform url in mailing --- htdocs/comm/mailing/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index ce260a44a35..7c1d0542334 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -244,6 +244,9 @@ if (empty($reshook)) { $substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash($conf->global->PAYMENT_SECURITY_TOKEN.'contractline'.$obj->source_id, 2); } } + if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM___'] = ''.$langs->trans('BlankSubscriptionForm').''; + } /* For backward compatibility, deprecated */ if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) { $substitutionarray['__SECUREKEYPAYPAL__'] = dol_hash($conf->global->PAYPAL_SECURITY_TOKEN, 2); From a75d6e905082651f76390cf34079f88a9be82fac Mon Sep 17 00:00:00 2001 From: daraelmin Date: Fri, 7 May 2021 17:14:33 +0200 Subject: [PATCH 2/7] Add tooltip --- htdocs/core/class/html.formmail.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 96f6ee0a741..16c17f5a386 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1633,6 +1633,9 @@ class FormMail extends Form $vars['__SECUREKEYPAYMENT_CONTRACTLINE__']=''; */ } + if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM___'] = 'BlankSubscriptionForm'; + } } foreach ($tmparray as $key => $val) { From bfac47c84e4ac79baa969fd62c3217fb1b1303a9 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Fri, 7 May 2021 17:16:58 +0200 Subject: [PATCH 3/7] Too much underscore --- htdocs/core/class/html.formmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 16c17f5a386..a9da488907d 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1634,7 +1634,7 @@ class FormMail extends Form */ } if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { - $substitutionarray['__PUBLICLINK_NEWMEMBERFORM___'] = 'BlankSubscriptionForm'; + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = 'BlankSubscriptionForm'; } } From 7c27e9f931266557ced81b3255f3499ece51b15a Mon Sep 17 00:00:00 2001 From: daraelmin Date: Fri, 7 May 2021 17:19:33 +0200 Subject: [PATCH 4/7] too much underscore --- htdocs/comm/mailing/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 7c1d0542334..afbff9a770b 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -245,7 +245,7 @@ if (empty($reshook)) { } } if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { - $substitutionarray['__PUBLICLINK_NEWMEMBERFORM___'] = ''.$langs->trans('BlankSubscriptionForm').''; + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm').''; } /* For backward compatibility, deprecated */ if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) { From 33d68db9a14d3a55a15f5d95481245b14aee0db0 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Sat, 8 May 2021 09:18:41 +0200 Subject: [PATCH 5/7] add entity in new subst publiclink_newmemberform --- htdocs/comm/mailing/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index afbff9a770b..e843d54f6e8 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -245,7 +245,7 @@ if (empty($reshook)) { } } if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { - $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm').''; + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm'). ''; } /* For backward compatibility, deprecated */ if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) { From 2e1158934bebf9e8b798b76e458ab648bef9c6f1 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Sat, 8 May 2021 09:20:59 +0200 Subject: [PATCH 6/7] Copyright --- htdocs/comm/mailing/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index e843d54f6e8..eedf2fdd5d9 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2019 Laurent Destailleur * Copyright (C) 2005-2016 Regis Houssin + * Copyright (C) 2021 Waƫl Almoman * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 22d9c4c1662b608165d7d7e1b3b37d12d58dfd89 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Sat, 8 May 2021 09:35:41 +0200 Subject: [PATCH 7/7] Update card.php --- htdocs/comm/mailing/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index eedf2fdd5d9..42bac2af7e5 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -246,7 +246,7 @@ if (empty($reshook)) { } } if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { - $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm'). ''; + $substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = ''.$langs->trans('BlankSubscriptionForm'). ''; } /* For backward compatibility, deprecated */ if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_SECURITY_TOKEN)) {