rewrite membership warning text
authorAndrew Hunt <andrew@aghstrategies.com>
Mon, 29 Apr 2013 00:55:38 +0000 (20:55 -0400)
committerAndrew Hunt <andrew@aghstrategies.com>
Mon, 29 Apr 2013 00:55:38 +0000 (20:55 -0400)
CRM/Member/Form/Membership.php

index 52cf0089a7c3e71bda09e61d856a46a7a765251b..15c7faa32a50761e52c6eef5d26438f83a2db90f 100644 (file)
@@ -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. <a href="%4">Click here if you want to renew this membership</a> (rather than creating a new membership record). <a href="%5">Click here to view all existing and / or expired memberships for this contact.</a>', 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. <a href="%3">Click here if you want to renew this membership</a> (rather than creating a new membership record). <a href="%4">Click here to view all existing and / or expired memberships for this contact.</a>', 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.<ul><li><a href="%4">Renew the existing membership instead</a></li><li><a href="%5">View all existing and / or expired memberships for this contact</a></li></ul>', array(1 => $hasMembership['membership_type'], 2 => $hasMembership['membership_status'], 3 => $andEndDate, 4 => $renewUrl, 5 => $membershipTab)), 'Creating Additional Membership', 'alert');
         }
       }
     }