From bb8b3d4e5cf9a986d25fdc65cea56f30ebe68d0b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 00:25:42 +0100 Subject: [PATCH 01/10] Add br --- htdocs/admin/mails_templates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 2ff20e9acc7..e0dfcd75277 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -544,7 +544,7 @@ foreach ($fieldsforcontent as $tmpfieldlist) print '' . $form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist) . ' '; } if ($tmpfieldlist == 'content') - print $form->textwithpicto($langs->trans("Content"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist); + print $form->textwithpicto($langs->trans("Content"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
'; if ($tmpfieldlist == 'content_lines') print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist) . '
'; // Input field From d6501d996c57fa1fa30168116242690f49238933 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 13:52:59 +0100 Subject: [PATCH 02/10] Missing trans --- htdocs/langs/en_US/members.lang | 5 +++-- htdocs/public/payment/newpayment.php | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 89b24166fc2..5f386b87718 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -156,8 +156,8 @@ DocForAllMembersCards=Generate business cards for all members DocForOneMemberCards=Generate business cards for a particular member DocForLabels=Generate address sheets SubscriptionPayment=Subscription payment -LastSubscriptionDate=Latest subscription date -LastSubscriptionAmount=Latest subscription amount +LastSubscriptionDate=Date of latest subscription payment +LastSubscriptionAmount=Amount of latest subscription MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town @@ -195,3 +195,4 @@ NoEmailSentToMember=No email sent to member EmailSentToMember=Email sent to member at %s SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') +MemberShipPaid=Membership paid for current period \ No newline at end of file diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 160d8be67de..6df6fba57f6 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1319,6 +1319,13 @@ if ($source == 'membersubscription') print ''; print ''."\n"; + if ($object->datefin > 0) + { + print ''.$langs->trans("DateEndSubscription"); + print ''.dol_print_date($member->datefin,'day'); + print ''."\n"; + } + if ($member->last_subscription_date || $member->last_subscription_amount) { // Last subscription date @@ -1591,6 +1598,7 @@ if ($action != 'dopayment') } elseif ($source == 'membersubscription' && $object->datefin > dol_now()) { + $langs->load("members"); print '

'.$langs->trans("MembershipPaid").''; } elseif ($source == 'donation' && $object->paid) From b58c49d0bbd80a3569fdeb6c295716f198297453 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 13:59:23 +0100 Subject: [PATCH 03/10] Trans --- htdocs/langs/en_US/members.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 5f386b87718..e0a8dfcb656 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -195,4 +195,4 @@ NoEmailSentToMember=No email sent to member EmailSentToMember=Email sent to member at %s SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') -MemberShipPaid=Membership paid for current period \ No newline at end of file +MembershipPaid=Membership paid for current period \ No newline at end of file From 6d09c8523198e98da9c272382d2e7d08f345a943 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 14:01:32 +0100 Subject: [PATCH 04/10] Fix missing button --- htdocs/public/payment/newpayment.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6df6fba57f6..e7e911ead7b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1596,17 +1596,19 @@ if ($action != 'dopayment') { print '

'.$langs->trans("InvoicePaid").''; } - elseif ($source == 'membersubscription' && $object->datefin > dol_now()) - { - $langs->load("members"); - print '

'.$langs->trans("MembershipPaid").''; - } elseif ($source == 'donation' && $object->paid) { print '

'.$langs->trans("DonationPaid").''; } else { + // Membership can be paid and we still allow to make renewal + if ($source == 'membersubscription' && $object->datefin > dol_now()) + { + $langs->load("members"); + print '

'.$langs->trans("MembershipPaid").''; + } + // Buttons for all payments registration methods if ((empty($paymentmethod) || $paymentmethod == 'paybox') && ! empty($conf->paybox->enabled)) From e5827f77cb742c1a1d577e2db394e7307919aa6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 14:03:35 +0100 Subject: [PATCH 05/10] Fix link to pay membership renewal --- htdocs/public/payment/newpayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index e7e911ead7b..53f74b0e49b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1606,7 +1606,7 @@ if ($action != 'dopayment') if ($source == 'membersubscription' && $object->datefin > dol_now()) { $langs->load("members"); - print '

'.$langs->trans("MembershipPaid").''; + print '
'.$langs->trans("MembershipPaid").'
'; } // Buttons for all payments registration methods From 541f6e537eaeedde4f267847a80160ff15bd2163 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 14:05:39 +0100 Subject: [PATCH 06/10] Fix link to pay membership renewal --- htdocs/langs/en_US/members.lang | 2 +- htdocs/public/payment/newpayment.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index e0a8dfcb656..6bee353c7ea 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -195,4 +195,4 @@ NoEmailSentToMember=No email sent to member EmailSentToMember=Email sent to member at %s SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') -MembershipPaid=Membership paid for current period \ No newline at end of file +MembershipPaid=Membership paid for current period (until %s) \ No newline at end of file diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 53f74b0e49b..e35ef840978 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1606,7 +1606,7 @@ if ($action != 'dopayment') if ($source == 'membersubscription' && $object->datefin > dol_now()) { $langs->load("members"); - print '
'.$langs->trans("MembershipPaid").'
'; + print '
'.$langs->trans("MembershipPaid", $object->datefin).'
'; } // Buttons for all payments registration methods From e3d0cb16378d95399d1996ae1475b0393377fd64 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 14:32:23 +0100 Subject: [PATCH 07/10] Fix css --- htdocs/public/payment/newpayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index e35ef840978..6ed907b3e79 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1606,7 +1606,7 @@ if ($action != 'dopayment') if ($source == 'membersubscription' && $object->datefin > dol_now()) { $langs->load("members"); - print '
'.$langs->trans("MembershipPaid", $object->datefin).'
'; + print '
'.$langs->trans("MembershipPaid", $object->datefin).'
'; } // Buttons for all payments registration methods From 4de122d1d4ebabbc5a7b8a99f8d9db38701fef93 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 14:33:03 +0100 Subject: [PATCH 08/10] Fix date format --- htdocs/public/payment/newpayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6ed907b3e79..327c57a0948 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1606,7 +1606,7 @@ if ($action != 'dopayment') if ($source == 'membersubscription' && $object->datefin > dol_now()) { $langs->load("members"); - print '
'.$langs->trans("MembershipPaid", $object->datefin).'
'; + print '
'.$langs->trans("MembershipPaid", dol_print_date($object->datefin, 'day').'
'; } // Buttons for all payments registration methods From fbed22050dcfc643e718833b7c1b6df35a9ae4fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 14:33:36 +0100 Subject: [PATCH 09/10] fix syntax error --- htdocs/public/payment/newpayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 327c57a0948..39d21ebbc0c 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1606,7 +1606,7 @@ if ($action != 'dopayment') if ($source == 'membersubscription' && $object->datefin > dol_now()) { $langs->load("members"); - print '
'.$langs->trans("MembershipPaid", dol_print_date($object->datefin, 'day').'
'; + print '
'.$langs->trans("MembershipPaid", dol_print_date($object->datefin, 'day')).'
'; } // Buttons for all payments registration methods From b7f2a2b3f39dbc49b72491ed3ed7adf0b6d2b71e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 Feb 2019 15:15:41 +0100 Subject: [PATCH 10/10] Fix search alias page if page not found --- htdocs/website/index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 1433ae5324c..2f81d361637 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -116,6 +116,10 @@ if ($pageid < 0) $pageid = 0; if (($pageid > 0 || $pageref) && $action != 'addcontainer') { $res = $objectpage->fetch($pageid, ($object->id > 0 ? $object->id : null), $pageref); + if ($res == 0) + { + $res = $objectpage->fetch($pageid, ($object->id > 0 ? $object->id : null), null, $pageref); + } // Check if pageid is inside the new website, if not we reset param pageid if ($res >= 0 && $object->id > 0)