From 0c9480c9fef18d72d9584b41d1753637b6aaf3cb Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Sun, 28 Apr 2013 20:55:38 -0400 Subject: [PATCH] rewrite membership warning text --- CRM/Member/Form/Membership.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index 52cf0089a7..15c7faa32a 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -215,12 +215,11 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { "reset=1&action=renew&cid={$this->_contactID}&id={$hasMembership['id']}&context=membership&selectedChild=member" ); } + $andEndDate = ''; if (CRM_Utils_Array::value('membership_end_date', $hasMembership)) { - CRM_Core_Session::setStatus(ts('This contact has an existing %1 membership record with %2 status and end date of %3. Click here if you want to renew this membership (rather than creating a new membership record). Click here to view all existing and / or expired memberships for this contact.', array(1 => $hasMembership['membership_type'], 2 => $hasMembership['membership_status'], 3 => CRM_Utils_Date::customformat($hasMembership['membership_end_date']), 4 => $renewUrl, 5 => $membershipTab)), '', 'alert'); - } - else { - CRM_Core_Session::setStatus(ts('This contact has an existing %1 membership record with %2 status. Click here if you want to renew this membership (rather than creating a new membership record). Click here to view all existing and / or expired memberships for this contact.', array(1 => $hasMembership['membership_type'], 2 => $hasMembership['membership_status'], 3 => $renewUrl, 4 => $membershipTab)), '', 'alert'); + $andEndDate = ts(" and end date of %1", array(1 => CRM_Utils_Date::customformat($hasMembership['membership_end_date']))); } + CRM_Core_Session::setStatus(ts('This contact has an existing %1 membership record with %2 status%3.', array(1 => $hasMembership['membership_type'], 2 => $hasMembership['membership_status'], 3 => $andEndDate, 4 => $renewUrl, 5 => $membershipTab)), 'Creating Additional Membership', 'alert'); } } } -- 2.25.1